ma1*_*w28 5 git ssh github git-clone git-submodules
为什么人们有这个问题?
$ git clone --recursive git@github.com:acani/Chats.git克隆到'聊天'...权限被拒绝(公钥).致命:无法从远程存储库读取.
请确保您具有正确的访问权限并且存储库存在.
https://github.com/acani/Chats/issues/53#issuecomment-118014684
我已经阅读了一些答案,说要将子模块URL从SSH更改为HTTP,但为什么我必须这样做.我不想那样做.我想保留SSH,这样如果我想推送,我就不必在终端输入我的用户名和密码.每个人都可以很好地克隆SSH URL,那么他们为什么不能将它作为子模块递归克隆呢?
作为解决方法,您可以尝试使用https url进行任何github repo:
cd myParentRepo
git config url.https://github.com/.insteadOf ssh://git@github.com/
# or
git config url.https://github.com/.insteadOf git@github.com:
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2882 次 |
| 最近记录: |