What's the purpose of the colon in this git repository url?

前端 未结 3 820
再見小時候
再見小時候 2021-02-19 08:23

Please pardon my ignorance; I\'m new to Git and not sure where better to look for an answer, but what\'s the purpose of the colon after \'example.com\' in the following url (whi

3条回答
  •  攒了一身酷
    2021-02-19 09:10

    This syntax is actually wrong, but it's a bit like the scp-style syntax that you can use in git URLs, where it separates the hostname from the path on that host. Your options for specifying git URLs are listed in the git clone documentation. In your case you probably want one of the following instead:

     serveradmin%example.com@example.com:/home/45678/domains/git.example.com/html/example.git
    

    ... or:

     ssh://serveradmin%example.com@example.com/home/45678/domains/git.example.com/html/example.git
    

    In either case, the username is serveradmin%example.com, the hostname is example.com and the path on that host is /home/45678/domains/git.example.com/html/example.git.

提交回复
热议问题