Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用https而不是ssh克隆github repo递归_Git_Github - Fatal编程技术网

使用https而不是ssh克隆github repo递归

使用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

有一个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密钥添加到某人的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
我自己,然后更新子模块。有没有更好的办法