Git clone, ssh: Could not resolve hostname
Now this was annoying. I tried a git clone ssh://user@my.host:/path/to/repository and it failed with
Initialized empty Git repository in /current/path/repository/.git/ ssh: Could not resolve hostname my.host:: Name or service not known fatal: The remote end hung up unexpectedly
The solution was rather easy, see man 1 git-clone. A valid git URL looks like this:
ssh://[user@]host.xz/path/to/repo.git/
Don’t try to use paths as ports. git isn’t scp.
Related posts:
[...] [1] http://hokietux.net/blog/?p=58 [2] http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way [3] http://www.nkuttler.de/2009/04/06/git-clone-ssh-could-not-resolve-hostname/ [...]