Git一直无法从服务器上的上游提取数据
每当我ssh到VPS中时,我总是要运行大量命令,以便让我的git repo从上游获取更改。有时候,我很幸运,它也能起作用。在很大程度上,它给了我一个未找到的错误:Git一直无法从服务器上的上游提取数据,git,ssh,Git,Ssh,每当我ssh到VPS中时,我总是要运行大量命令,以便让我的git repo从上游获取更改。有时候,我很幸运,它也能起作用。在很大程度上,它给了我一个未找到的错误: ERROR: Repository not found. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 我已将以下内容添加到计算
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我已将以下内容添加到计算机上.bashrc
文件的末尾:
eval "$(ssh-agent)"
eval "ssh-add /home/deploy/.ssh/id_rsa3"
当我在中使用ssh时,我在shell中看到以下输出:
Agent pid 7974
Identity added: /home/deploy/.ssh/id_rsa3 (/home/deploy/.ssh/id_rsa3)
id_rsa3的公钥指纹与Github上repo设置中保存的部署密钥匹配。除非我手动运行上面的命令,否则它永远不会工作。这是为什么?在
~/.ssh/config
中设置配置,以便您ssh
在非标准位置使用密钥:
Host git-host-you-are-using-to-pull-from
IdentityFile /home/deploy/.ssh/id_rsa3
请在
~/.ssh/config
中设置配置,以便ssh
在非标准位置使用密钥:
Host git-host-you-are-using-to-pull-from
IdentityFile /home/deploy/.ssh/id_rsa3
您正在尝试运行哪些(失败的)命令?您的正常ssh密钥(例如~/.ssh/id\u rsa
)是否已连接到github帐户?您的github帐户有权访问回购协议吗?您正在尝试运行哪些(失败的)命令?您的正常ssh密钥(例如~/.ssh/id\u rsa
)是否已连接到github帐户?您的github帐户是否有权访问回购协议?