I’ve followed the git tutorials and the multiple-sites-in-1-droplet tutorial from DigitalOCean and now my sites are in var/www/site1 var/www/site2
Then I’m assuming I need to create my git repos inside these folders And when these git repos are created, how can I make a push from my laptop to these repos?
I guess is something like this (in my laptop git console): git remote add origin ssh://my_username@199.99.999.999/var/www/site1.git But I got a “Connect to host port 22 refused. The remote end hung up.”
Where 199.99.999.999 is my websites IP. I don’t use a domain name, because I have multiple sites and the DNS are not already set until I finish a hosting transition.
What am I doing wrong?
Thanks a lot.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
I actually have a rather non-conventional setup. My documentroots are in /home/git/public_html/<site>/, but that’s purely personal preference. <br> <br>Gitolite is a great too with pretty good documentation.
Thanks Jason <br> <br>I didn;t know about gitolite. Where are your sites? Inside var/www ? <br>
My setup, using gitolite, has the documentroot for my sites controlled with git to a subdirectory within /home/git. I find it easier to work with things that way. <br> <br>If you want to do it all manually, without gitolite, you can just do “git init --bare” wherever you’d like, to create a repository.