GIT and URL specification
-
Hi,
could somebody explain please why this works:$git fetch git@rcs.pfsense.org:pfsense/my_clone_here.git
but this one does not work:
$ git fetch ssh://git@rcs.pfsense.org/pfsense/my_clone_here.git Access denied or bad command fatal: The remote end hung up unexpectedly
Thanks.
-
$ git fetch ssh://git@rcs.pfsense.org/pfsense/my_clone_here.git
that should be
$ git fetch ssh://git@rcs.pfsense.org:pfsense/my_clone_here.git
-
No, I tried that:```
$ git fetch ssh://git@rcs.pfsense.org:pfsense/my_clone_here.git/
ssh: Could not resolve hostname rcs.pfsense.org:pfsense: Name or service not known
fatal: The remote end hung up unexpectedlyAccording to man: > Git natively supports ssh, git, http, https, ftp, ftps, and rsync protocols. The following syntaxes may be used with them: > ssh://[user@]host.xz[:port]/path/to/repo.git/ > … > An alternative scp-like syntax may also be used with the ssh protocol: > [user@]host.xz:path/to/repo.git/ I am trying to find a way to specify port but for now I am just interested why "ssh://" syntax does not work. Thanks.
-
git@rcs.pfsense.org uses a custom shell that only accepts a certain path string, and there is no way in the ssh:// syntax to leave off the initial slash from the path. There is no way around this unless it is changed on the server or if you modify git to make an equivalent syntax for ssh://
-
Thank you. Now it is clear why it fails.