0
每當我進入我的VPS時,我總是必須通過一系列命令才能讓我的git repo從上游獲取更改。有時候我很幸運,而且很有效。在大多數情況下它給了我找不到錯誤:Git始終無法從服務器上游拉動
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在我看到的在外殼下面的輸出:
Agent pid 7974
Identity added: /home/deploy/.ssh/id_rsa3 (/home/deploy/.ssh/id_rsa3)
爲id_rsa3
公鑰的匹配指紋保存在Github上回購設置部署的關鍵。除非我手動運行上述命令,否則它永遠不會工作。這是爲什麼?
什麼(失敗的)命令是你想運行?是你的*普通* ssh-key(例如'〜/ .ssh/id_rsa')連接到你的github帳戶?您的github賬戶是否有權訪問回購? –