[英]Git Submodule git@github.com: Permission denied (publickey) error
When I run 我跑的时候
git submodule add -f git@github.com:VundleVim/Vundle.vim.git .vim/bundle/Vundle.vim
this happens 有时候是这样的
Cloning into '/home/ridhwaans/dotfiles/.vim/bundle/Vundle.vim'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:VundleVim/Vundle.vim.git' into submodule path '/home/ridhwaans/dotfiles/.vim/bundle/Vundle.vim
Im in the base directory of the .git project, ssh key is active, ssh -T git@github.com
returns valid, I rather not use the https url. 我在.git项目的基本目录中,ssh键是活动的,
ssh -T git@github.com
返回有效,我宁愿不使用https url。
why does this occur and how do you fix it 为什么会发生这种情况,你如何解决它
VundleVim/Vundle.vim
is a public repository on GitHub. VundleVim/Vundle.vim
是GitHub上的公共存储库。
So for a submodule, you don't need to use the SSH URL: 因此,对于子模块,您不需要使用SSH URL:
git submodule add -f https://github.com/VundleVim/Vundle.vim.git .vim/bundle/Vundle.vim
But if you don't want to use HTTPS, you can try and see what is blocking with (assuming Linux): 但是,如果您不想使用HTTPS,您可以尝试查看阻塞的内容(假设Linux):
export GIT_SSH_COMMAND="ssh -v"
git ls-remote git@github.com:VundleVim/Vundle.vim.git
git submodule add -f git@github.com:VundleVim/Vundle.vim.git .vim/bundle/Vundle.vim
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.