Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 拒绝在我的vps上使用CentOS 7.0权限的git(公钥)。致命:无法从远程存储库读取。每次_Linux_Git_Ssh_Centos7 - Fatal编程技术网

Linux 拒绝在我的vps上使用CentOS 7.0权限的git(公钥)。致命:无法从远程存储库读取。每次

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/

当我登录到我的服务器并执行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/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`