I followed this tutorial:
https://www.digitalocean.com/community/articles/how-to-set-up-a-private-git-server-on-a-vps
I’d like to point out that the ssh key was wrong. The ssh should be on your local machine and it is copied from the local machine to the server, not from the server machine to the server machine.
With that out of the way, I really cannot get git to deploy from my local machine to the server. I’ve tried a million variations on the theme.
I began by creating a “git” user, though I chose to give it a different name that “git”, so I have the following variations on my local machine:
git remote set-url origin gitUser@192.241.194.172:myProject.git
Since that failed, I tried:
git remote set-url origin gitUser@192.241.194.172:/path/to/myProject.git
git remote set-url origin gitUser@192.241.194.172/path/to/myProject.git
git remote set-url origin gitUser@192.241.194.172:path/to/myProject.git
git remote set-url origin gitUser@192.241.194.172/path/to/myProject
git remote set-url origin gitUser@192.241.194.172/path/to/myProject/
And since all of the above failed, I looked around the net and seen these suggestions:
git remote set-url origin ssh://gitUser@192.241.194.172/path/to/myProject
git remote set-url origin ssh://gitUser@192.241.194.172/path/to/myProject/
git remote set-url origin ssh://gitUser@192.241.194.172/path/to/myProject.git
git remote set-url origin ssh://gitUser@192.241.194.172/path/to/myProject
Well, you get the point, just permute through all the variations and all of them fail, so I started using:
git remote set-url origin ssh://root@192.241.194.172/path/to/myProject
with all the above variations.
Some fail via time-out, others fails with “no repository.”
I’ve been beating my head over this one for a few days now, and at this point, I’ve simply given up. How is it possible that 10 different people can all use different things and they all work?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Okay, I think I see what the problem is with this error: <br> <br>ssh: connect to host 123.456.789.123 Port 22: Connection Timed Out <br> <br>… and I am not using Port 22. <br> <br>So, I changed the port number in ssh_config and I can now connect and push.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.