';git克隆user@server/我的回购吉特';和';git克隆git://user@服务器/my repo.git“;

';git克隆user@server/我的回购吉特';和';git克隆git://user@服务器/my repo.git“;,git,Git,我运行git clone时看起来像是这样user@server/my-repo.git,它不使用端口9418。运行git克隆git://user@如果端口9418未打开,服务器/my-repo.git将执行此操作并失败 前一种方法使用哪个端口?git cloneuser@server/my repo.git使用默认端口为22的ssh协议。它相当于git克隆ssh://user@server/my repo.git git克隆git://user@server/my repo.git使用带有默认端

我运行git clone时看起来像是这样user@server/my-repo.git,它不使用端口9418。运行git克隆git://user@如果端口9418未打开,服务器/my-repo.git将执行此操作并失败


前一种方法使用哪个端口?

git cloneuser@server/my repo.git
使用默认端口为22的ssh协议。它相当于git克隆ssh://user@server/my repo.git

git克隆git://user@server/my repo.git
使用带有默认端口9418的git协议


此外,Git支持默认端口为80的http协议,以及默认端口为443的https。对于本地存储库,
/path/to/repo.git/
file:///path/to/repo.git/
也受支持。

git克隆user@server/my repo.git
使用默认端口为22的ssh协议。它相当于git克隆ssh://user@server/my repo.git

git克隆git://user@server/my repo.git
使用带有默认端口9418的git协议

此外,Git支持默认端口为80的http协议,以及默认端口为443的https。对于本地存储库,
/path/to/repo.git/
file:///path/to/repo.git/
也受支持