GIT and URL specification

  • Hi,
    could somebody explain please why this works:

    $git fetch

    but this one does not work:

    $ git fetch ssh://
    Access denied or bad command
    fatal: The remote end hung up unexpectedly


  • @Evgeny:

    $ git fetch ssh://

    that should be

    $ git fetch ssh://

  • No, I tried that:```
    $ git fetch ssh://
    ssh: Could not resolve hostname Name or service not known
    fatal: The remote end hung up unexpectedly

    According 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.

  • 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.

Log in to reply