Git clone, ssh: Could not resolve hostname

Tagged git

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.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Related posts:

  1. Using git for WordPress development

1 Comment

Leave a Reply

Your email is never shared. Required fields are marked *

*
*