| HTTPS | 443 端口,兼容性好,凭据走 helper/令牌 |
|---|---|
| SSH | 密钥认证,适合长期使用与自动化 |
| git:// | 9418 端口,多数平台已不建议或默认关闭 |
常用示例
常用示例
git clone https://github.com/org/repo.git
git clone git@github.com:org/repo.git
git clone ssh://git@example.com:2222/org/repo.git公司网络仅放行 443 时,可优先 HTTPS;需要免交互自动化时用带部署密钥的 SSH。