0

Alright, quick question.

When SSHing to a server using the IP, I can also specify a path to use, such as:

git clone ssh://[email protected]:/home/git/project.git SomeProject

However, when using a hostname, the command thinks the path is part of the host name:

git clone ssh://[email protected]:/home/git/project.git SomeProject

Which yields an error about the : before the path

ssh: localhost.com:: no address associated with name

(Yes, I am aware that I cannot SSH into localhost.com)

Is there a way to specify the path as in the IP example, but with a hostname?

Thanks!

1 Answer 1

3

Why did you decide that a Git SSH URI must have a : after a hostname? Where did you see this format?

Formal SSH-URI specification is

ssh://[user@]host.xz[:port]/path/to/repo.git/
2
  • 1
    It's derived from scp notation.
    – Jan Marek
    Jan 26, 2012 at 8:54
  • That is the strangest thing.... I seriously could not get it working until now. One of those days, I guess. Thanks! Jan 26, 2012 at 8:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .