dbtoomey
By:
dbtoomey

Stuck on final deploy via git.

September 16, 2013 2.5k views
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?
2 Answers
Okay, I think I see what the problem is with this error:

ssh: connect to host 123.456.789.123 Port 22: Connection Timed Out

... and I am not using Port 22.

So, I changed the port number in ssh_config and I can now connect and push.
Have another answer? Share your knowledge.