繁体   English   中英

Git一直无法从服务器的上游拉出

[英]Git keeps failing to pull from upstream on server

每当我将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.

我在计算机上的.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上的回购设置中的部署密钥匹配。 除非我手动运行以上命令,否则它永远无法工作。 这是为什么?

~/.ssh/config以便ssh在非标准位置使用密钥:

Host git-host-you-are-using-to-pull-from
  IdentityFile /home/deploy/.ssh/id_rsa3

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM