github - 致命:无法从远程存储库 Laravel Forge 读取
问题描述
部署时出现此错误,但能够提交和推送代码。发生此问题后,我已删除以前的开发人员存储库。我尝试在服务器上生成新的 ssh 密钥,然后将其添加到新的存储库,但 github 显示密钥已在使用消息。
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我该如何解决这个问题?我只想使用我的新存储库进行部署。
解决方案
您可以浏览 Nash 的“解决 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 ”。
推荐阅读
- python - dymola.readTrajectory - 不同的采样时间
- android - 使用 fileTransfer 下载 Ionic 4
- python - 如何将 random.seed 与 random.randn 一起使用?
- jenkins - 在 Jenkins 上存储文件(不在凭证中)
- sas - 提取在 TWS 中安排的作业中使用的大型机数据集
- android - Android Studio - 重新打开项目后出现很多错误
- qt - Qt Creator 以不同的配置运行 CMake
- javascript - Classlist.add 以更短的方式?
- javascript - 为什么 export * 和 import * 在 ES2015 模块中的工作方式不同
- git - 用于 CMD 和 VS 的单独 GIT 差异和合并工具