首页 > 解决方案 > 致命:无法从远程存储库读取(通过 ssh)

问题描述

当我尝试使用此命令在 AWS code-commit repo 上推送代码时

//错误来自下面的第二条语句。

git add remote codecommit ssh://git-codecommit.us-east-1.amazonaws.com/Test-codecommit-repo

git push codecommit develop

它向我显示了这样的错误:

fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

我的 ~/.ssh/config 文件如下所示:

Host git-codecommit.*.amazonaws.com
User AP***************UQ
IdentityFile ~/.ssh/codecommit_rsa

此密钥是完美的,使用此密钥访问 repo 没有错误

我只想通过 ssh 而不是 https 访问我的仓库。我现在该怎么办 ??

标签: gitaws-codecommit

解决方案


ssh://git-codecommit.us-east-1.amazonaws.com/Test-codecommit-repo

这似乎必须遵循:

ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/Test-codecommit-repo

推荐阅读