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://git@127.0.0.1:/home/git/project.git SomeProject

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

git clone ssh://git@localhost.com:/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 Answers1

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/
Lazy Badger
  • 3,137
  • 15
  • 13