将ssh vs https与github子模块一起使用

编程入门 行业动态 更新时间:2024-10-16 00:24:00
本文介绍了将ssh vs https与github子模块一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想建立一个带有子模块的公共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!

推荐答案

使用协议发布子模块,但使所有开发人员都使用ssh://协议. Git可以用一种协议即时替代另一种协议:

Publish your submodules with 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

更多推荐

将ssh vs https与github子模块一起使用

本文发布于:2023-10-07 13:10:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1469472.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模块   ssh   https   github

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!