Question

Stuck on final deploy via git.

  • Posted September 16, 2013

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?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Glad it’s working now :]

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.