git - 致命:无法从远程存储库读取(通过 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 访问我的仓库。我现在该怎么办 ??
解决方案
ssh://git-codecommit.us-east-1.amazonaws.com/Test-codecommit-repo
这似乎必须遵循:
ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/Test-codecommit-repo
推荐阅读
- html - 如何让我的响应式导航栏在打开时覆盖在我的内容之上?
- bash - 使用 `--version` 打印`brew --cellar formula`
- c# - 如何在 ASP.NET Core 3.1 中逐行迭代列表
- javascript - 如何进行这种更改方法,以便获得该给定金额的账单
- swiftui - 本地化包含图像和文本的文本内容
- r - 给定一个包含日期和时间的 POSIXct 序列,我如何仅计算时间的平均值(不包括天数)?
- firefox - crossOriginIsolated 在非本地主机地址处为假。我该如何解决?
- javascript - Flask 和 jQuery '$' 未定义
- javascript - jquery min js和slim js有什么区别
- sql - SQL 窗口化并持续使用过滤器通过阈值