使用https而不是ssh克隆github repo递归
有一个github repo a,它有一个子模块repo B。a和B都是公共的,因此任何人都可以使用使用https而不是ssh克隆github repo递归,git,github,Git,Github,有一个github repo a,它有一个子模块repo B。a和B都是公共的,因此任何人都可以使用git clone克隆它们,或者只需下载zip 在A的.gitmodules中,通过ssh连接字符串指定对B的引用 url = git@github.com:PersonB/B.git 如果我在本地机器上运行一个--recursivegit clone,它可以正常工作,因为我的ssh密钥在github上。但是,我需要在一台服务器上运行,实际上是多台服务器,而不是我自己。因此,无法将所有这些ssh
git clone
克隆它们,或者只需下载zip
在A的.gitmodules
中,通过ssh连接字符串指定对B的引用
url = git@github.com:PersonB/B.git
如果我在本地机器上运行一个--recursivegit clone,它可以正常工作,因为我的ssh密钥在github上。但是,我需要在一台服务器上运行,实际上是多台服务器,而不是我自己。因此,无法将所有这些ssh密钥添加到某人的github帐户。如果我从服务器上运行git clone A--recursive,我会得到好的结果
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
这里的第一个选项是要求开发人员A更改.gitmodules
中的url
,但是,这可能不是唯一一个这样的repo。第二种选择是在浅层克隆之后重写.gitmodules
我自己,然后更新子模块。有没有更好的办法