将ssh vs https与github子模块一起使用 [英] Using ssh vs https with github submodules
问题描述
我想建立一个带有子模块的公共GitHub存储库. GitHub提供了两种连接方式-https:...
& git@...
协议.对于从事该项目的团队而言,git@...
更加易于使用,因为我们所有人都使用正确的ssh证书.但是对于不是团队成员的临时用户,https:...
是唯一的选择. git子模块需要完整的URL.
I would like to set up a public GitHub repo with submodules. GitHub offers two ways of connecting - https:...
& git@...
protocols. For the team working on the project, git@...
is much easier to use because we all use proper ssh certificates. But for the casual user who is not a member of the team, https:...
is the only option. The git submodules require a full URL.
我们如何设置存储库子模块,以便开发人员和临时贡献者都可以平等地使用该系统?谢谢!
How can we set up repository submodules so that both the developers and casual contributors can use the system equally well? Thanks!
推荐答案
使用https://
协议发布子模块,但使所有开发人员都使用ssh://
协议. Git可以用一种协议即时替代另一种协议:
Publish your submodules with https://
protocol but make all your developers to use ssh://
protocol. Git can substitute one protocol with the other on the fly:
git config url."ssh://git@".insteadOf https://
这篇关于将ssh vs https与github子模块一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!