Git子模块最佳实践 - 总是在https上使用ssh协议?

时间:2014-07-18 13:05:58

标签: git github ssh git-submodules

我在很多使用子模块的项目上工作,其中一些项目使用https and ssh protocols的组合添加到他们的父目录中,好像哪个不重要。 SSH协议具有使用ssh密钥的好处,但requires users set up those keys first

我想制定团队政策:所有项目在子模块中使用GitHub's git user with ssh protocol。该政策的利弊是什么?

1 个答案:

答案 0 :(得分:1)

临:

  • ssh密钥可以注册/撤销

缺点:

我更喜欢activating 2FA on GitHub account,并且只使用个人访问令牌,它也可以被撤销,但是用作 https url的经典用户名/密码方式(and which can be cached

在这两种情况下,user need to be added as a collaborator to the GitHub repo