简体   繁体   English

Git Submodule git@github.com:权限被拒绝(公钥)错误

[英]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.

相关问题 git@github.com:权限被拒绝(公钥) - git@github.com: Permission denied (publickey) git@github.com:权限被拒绝(公钥)错误 - git@github.com: Permission denied (publickey) ERROR Git 子模块:git@github.com:权限被拒绝(公钥)。 致命:无法从远程存储库中读取 - Git submodule: git@github.com: Permission denied (publickey). fatal: Could not read from remote repository git@github.com:权限被拒绝(公钥)。 但是 ssh git@github.com 有效 - git@github.com: Permission denied (publickey) . But ssh git@github.com works 为什么 git@github.com:Windows 中的权限被拒绝(公钥)? - Why git@github.com: Permission denied (publickey) in windows? 获取ssh git@github.com:权限被拒绝(公钥) - Fetching ssh git@github.com: Permission denied (publickey) git@github.com:来自公共存储库的权限被拒绝(公钥) - git@github.com: Permission denied (publickey) from public repository 我收到此错误 git@github.com: Permission denied (publickey), 当我在新 Mac 上 git push 时 - I get this error git@github.com: Permission denied (publickey), when I git push on new mac 如何解决 npm install react-select failure with error: An unknown git error occurred, git@github.com:Permission denied (publickey) - How to solve npm install react-select failure with error : An unknown git error occurred, git@github.com :Permission denied (publickey) 我不能做 git 推送:git@github.com:权限被拒绝(公钥) - I can't do git push: git@github.com: Permission denied (publickey)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM