2

Currently I would have to type

git clone ssh://git@<server_address>/home/git/<projectname>.git <projectname>

to be able to clone the project located at /home/git/<projectname> on the git server. But what If I knew that all my projects would be located in the home directory of the git user? Can I default git to use the home directory of the git user so that I would only have to type

git clone ssh://git@<server_address>:<projectname>.git
Kalcifer
  • 1,211
  • 12
  • 18

1 Answers1

0

Thanks to @phd, I was informed of the following solution:

The syntax that I used in my example

ssh://git@<server_address>:<projectname>

is incorrect, because ssh understands :<projectname> as a port number.

Using this scp-like syntax solves the issue:

git@<server_address>:<projectname>
Kalcifer
  • 1,211
  • 12
  • 18