将 Mercurial 中的子存储库 URL 从 https 更改为 ssh。这样做有什么问题吗?
我在 .hgsub
中有一个子存储库的条目,使用 https
调用。
myrepo = https://[email protected]/user/project
现在,我想使用 ssh,因为两个存储库都是我的,并且我已经创建了一个 ssh 密钥。所以,那就是:
myrepo = ssh://[email protected]/user/project
我没有改变,也没有测试。有人知道更改此网址是否会增加某种问题吗?
I have in a .hgsub
, an entry to a subrepository, that is invoked using https
.
myrepo = https://[email protected]/user/project
Now, I want to use ssh
since both repositories are mine and I've created a ssh key. So, it would be:
myrepo = ssh://[email protected]/user/project
I haven't changed, and haven't tested either. Does someone knows if changing this url is going to add some kind of problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只要您有一个密码或公钥/私钥组合可用于 ssh,就应该没问题,因为它与此处的示例语法相匹配:https://www.mercurial-scm.org/wiki/QuickStart
但是,您也可以执行以下操作:
这是我在推送/时在 .hg/hgrc 中的内容将项目拉到我的家庭服务器(如果两台计算机上的用户名相同,则可以删除 user@)。
It should be fine as long as you have a password or public/private key combo to use with ssh as that matches their example syntax here: https://www.mercurial-scm.org/wiki/QuickStart
However, you can also do the following:
This is what I have in my .hg/hgrc when I push/pull projects to my home server (user@ can be eliminated if you have the same username on both machines).