I’m trying to clone a remote git repo through ssh. When I try ssh into the remote host it prompts for password and works:
$ ssh gerry@5.12.221.37
However when I tried cloning the repository it gives this error
$ git clone ssh://gerry@5.12.221.37:/home/gerry/gitrepos/Test.git
ssh: Could not resolve hostname 5.12.221.37:: nodename nor servname provided, or not known
fatal: The remote end hung up unexpectedly
There isn’t any network issue since I can even perform telnet to 5.12.221.37 port 22.
I’m using mac osx 10.8, does anyone know how I can troubleshoot / resolve this problem?
Get rid of the colon:
git clone ssh://gerry@5.12.221.37/home/gerry/gitrepos/Test.git