Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    GIT and URL specification

    Scheduled Pinned Locked Moved Development
    5 Posts 3 Posters 3.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      Eugene
      last edited by

      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.

      http://ru.doc.pfsense.org

      1 Reply Last reply Reply Quote 0
      • C
        cmb
        last edited by

        @Evgeny:

        $ 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
        
        
        1 Reply Last reply Reply Quote 0
        • E
          Eugene
          last edited by

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

          http://ru.doc.pfsense.org

          1 Reply Last reply Reply Quote 0
          • E
            Efonnes
            last edited by

            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://

            1 Reply Last reply Reply Quote 0
            • E
              Eugene
              last edited by

              Thank you. Now it is clear why it fails.

              http://ru.doc.pfsense.org

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.