繁体   English   中英

Git add remote,是必需的ssh://前缀

[英]Git add remote, is the ssh:// prefix required

添加git repo作为远程是需要ssh://前缀? 我一直把它看作是:

git remote add user@server.com/path/here

是否隐含了ssh://前缀?

如果没有指定其他参数,Git默认为ssh协议。

看到

http://book.git-scm.com/3_getting_a_git_repository.html

如果你不明确,Git会假设SSH

我的来源: http//progit.org/book/ch4-1.html

好问题。 这是做ssh的简便方法,但它的语法与使用SSH url协议不同。 例如,使用上面的通用简写,没有空间来指定端口(假定22是最常见的并且最常见)。

有关您可以指定的各种方法的更多示例,请参阅我的博客文章,包括使用.ssh / config文件: http//readystate4.com/2011/03/30/working-with-git-repos-on-non-standard-端口/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM