git - 为什么我的第二个私有存储库没有使用我的 GitHub 部署密钥?
问题描述
我有两个私有的 GitHub 存储库和两个各自的具有写访问权限的部署密钥。对于第一个存储库,一切正常,但对于第二个,我总是获得:
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
如果我检查我加载的密钥:
ssh-add -E md5 -l
我可以看到这两个密钥的指纹与它们各自的 GitHub 部署密钥页面中的指纹相同。那么为什么我不能推送到第二个存储库?
解决方案
如果我运行:
ssh -T git@github.com
我看到我已使用第一个存储库的部署密钥进行了身份验证。
要推送到第二个存储库,我必须卸载所有密钥:
ssh-add -D
并添加回第二个存储库的密钥。
然后我可以推送到第二个存储库。
推荐阅读
- sparql - HM Land Registry SPARQL 邮政编码查询?
- swift - 由于 Firebase,MKUserTrackingButton 没有出现?
- python-3.x - 在数据块笔记本中“连续”运行一个单元格
- python - 使用投影和通过 find() 查询数组字段时出现 OperationFailure 错误
- jsp - 通过 POST 读取文件内容
- twilio - PHP Twilio RequestValidator 在所有端点上返回 false
- javascript - 如何从 then 和 catch 块中捆绑承诺
- nginx - 设置 nginx 以在单个域上为多个辅助项目提供服务,但不使用子域?
- python-3.x - 如何在 Hive 中匹配 SQL Server 函数
- pandas - 将 SQL 中的条件联接转换为 pandas