簡體   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