Linux 拒绝在我的vps上使用CentOS 7.0权限的git(公钥)。致命:无法从远程存储库读取。每次
当我登录到我的服务器并执行git pull时 我得到: 我必须执行此2命令:Linux 拒绝在我的vps上使用CentOS 7.0权限的git(公钥)。致命:无法从远程存储库读取。每次,linux,git,ssh,centos7,Linux,Git,Ssh,Centos7,当我登录到我的服务器并执行git pull时 我得到: 我必须执行此2命令: eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_rsa 在我注销并再次登录之前,它一直在工作 注意:我已经生成了ssh rsa,并将其保存为新的ssh密钥。删除 IdentityFile ~/.ssh/gitHubKey IdentityFile ~/.ssh/id_rsa_buhlServer 从~/.ssh/config并仅添加到那里 `IdentityFile ~/.ssh/
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
在我注销并再次登录之前,它一直在工作
注意:我已经生成了ssh rsa,并将其保存为新的ssh密钥。删除
IdentityFile ~/.ssh/gitHubKey
IdentityFile ~/.ssh/id_rsa_buhlServer
从~/.ssh/config
并仅添加到那里
`IdentityFile ~/.ssh/id_rsa`
如果这不是共享帐户,其他人可以使用其他选项
它应该可以完成这项工作。您的配置文件
~/.ssh/config
是什么样子?[core]repositoryformatversion=0 filemode=true bare=false logallrefupdates=true ignorecase=true precomposeunicode=true[remote“origin”]url=git@github.com:***/***.git fetch=+refs/heads/*:refs/remotes/origin/*[分支“主节点”]remote=origin merge=refs/heads/master[credential]helper=storeno,即.git/config
。我要求提供~/.ssh/config
.IdentityFile~/.ssh/gitHubKey IdentityFile~/.ssh/id\u rsa\u buhlserver删除该文件,并仅添加IdentityFile~/.ssh/id\u rsa
,如果该文件不是共享帐户。它应该能完成任务。
`IdentityFile ~/.ssh/id_rsa`