致命:无法从远程存储库Laravel Forge中读取

问题描述 投票:1回答:1

在部署时遇到此错误,但能够提交和推送代码。发生此问题后,我已经删除了以前的开发人员存储库。我试图在服务器上生成新的ssh密钥,然后将其添加到新的存储库中,但是github显示密钥已在使用中消息。

[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我该如何解决此问题?我只想使用新的存储库进行部署。

github ssh-keys forge repo
1个回答
0
投票

您可以浏览Nash的“ Solving common public key problems in Laravel Forge”中列出的常见原因列表:

  • Forge应该能够访问您的服务器
    • 密钥应在Servers -> YOUR SERVER -> Server Details -> Meta -> Forge's Public Key中注册
    • 您需要SSH到服务器中,并将此密钥添加到/home/forge/.ssh/authorized_keys文件和/root/.ssh/authorized_keys文件中。
  • 您的服务器应该可以访问您的Git存储库。您需要将服务器的公钥添加到Git存储库服务(例如GitHub,Bitbucket)。
  • 您的计算机应该可以访问您的Git存储库和服务器检查您自己的~/.ssh/id_rsa.pub

另请参见“ forge-docs / SSH Keys”。

© www.soinside.com 2019 - 2024. All rights reserved.