Max*_*Max 17 git github git-submodules
我无法克隆我的私有git存储库中存在的子模块.我有权访问整个存储库,
使用了以下命令但是工作,请帮忙.克隆现有存储库中子模块的正确方法是什么?
djrecker$ git submodule update --init --recursive
Submodule 'Path' (git@github.com:Path) registered for path 'App'
Cloning into 'Path'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Run Code Online (Sandbox Code Playgroud)
小智 33
我面临同样的问题.问题出在你的github repo上,你可能正在使用一些旧的ssh密钥.
您需要更新当前的ssh密钥.
Steps involved are:
1. vim ~/.ssh/id_rsa.pub
2. copy the ssh key
3. Go to the github settings
4. Select the option ssh keys
5. Remove the old ssh keys not used anymore.
6. Add a new ssh key.
7. Try running the "git submodule update --recursive"
Run Code Online (Sandbox Code Playgroud)
这对我有用!!
Sil*_*eel 10
我有这个问题.在我的情况下,没有在服务器上正确设置公钥(〜/ .ssh/id_rsa).
# This must be called twice. Once for new and once for existing submodules.
git submodule update --init --recursive
git submodule update --recursive
Run Code Online (Sandbox Code Playgroud)
ssh -vT git@github.com.确保您设置的密钥列在那里.有关权限问题的更多帮助,请按照以下指南操作:https:
//help.github.com/articles/error-permission-denied-publickey/.gitmodules在项目根文件夹中打开,确保看起来没问题.根据@VonC的建议,尝试将它们克隆到单独的文件夹中.Čam*_*amo 10
在我的情况下,问题是由控制台引起的,它没有要求我输入密码。解决方案是将控制台从 CMDER 更改为 Gitbash。当我使用 CMDER 时,它不会显示导致此访问被拒绝问题的密码窗口。