GitのURL指定を間違えるとCould not resolve hostnameに
gitでリモートブランチを追加して、
$ git add remote dev-web ssh://username@dev-web.example.com:/repos/hoge.git
リモートブランチへpushしようとしたら、以下のエラーが。
ssh: Could not resolve hostname dev-web.example.com:: Name or service not known
fatal: The remote end hung up unexpectedly
man git-cloneしてみたら、scpのようなフォーマットで書く場合は、下のようにプロトコルを省略すれば良いようだ。
username@dev-web.example.com:/repos/hoge.git
プロトコルを書く場合は、
ssh://username@dev-web.example.com/repos/hoge.git
とする。ホスト名の後ろの:は書かないこと。