aws codecommit无法推送 [英] aws codecommit cannot push

查看:264
本文介绍了aws codecommit无法推送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在aws codecommit中设置了我的新回购。我完全是新来的。



我可以使用这个克隆我的回购

  git clone ssh://APKAISIJVIU6XXXXXX@git-codecommit.us-east-1.amazonaws.com/v1/repos/weewee my-demo-repo 
$ b $ p然而,当我尝试推送时,我收到此消息

lockquote

Permission denied(公钥)。致命:无法从远程
存储库读取数据。


我按照AWS的说明设置配置文件和凭据。 / p>

我找不到我想要的东西。

解决方案

你在〜/ .ssh 目录中有多个公钥吗?



如果你有一个 id_rsa.pub 〜/ .ssh 中,但没有选择将其上传到IAM控制台,那么您需要配置 .ssh / config 以使用您指定的用户名选择的公钥。



例如,如果您创建并上传了名为 codecommit_rsa.pub (根据文档)的公钥,则需要将以下行添加到 〜/ .ssh / config

 
主机git-codecommit。*。amazonaws.com
用户APKAISIJVIU6XXXXXX
IdentityFile〜/ .ssh / codecommit_rsa

让我知道这是否有帮助!



iilun


I setup my new repo in aws codecommit. I'm totally new to this.

I can clone my repo using this

git clone ssh://APKAISIJVIU6XXXXXX@git-codecommit.us-east-1.amazonaws.com/v1/repos/weewee my-demo-repo

However when I try to push I get this message

Permission denied (publickey). fatal: Could not read from remote repository.

I setup the config file and the credentials as instructed in AWS.

I can't find what I'm missing.

解决方案

Do you have multiple public keys in your ~/.ssh directory?

If you have an id_rsa.pub in ~/.ssh but did not choose to upload that one to the IAM console then you will need to configure your .ssh/config to use the public key that you chose with the user name that you are specifying.

For example, if you have created and uploaded the public key named codecommit_rsa.pub (per the documentations), then you will need to add the following lines to your ~/.ssh/config

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

Let me know if this helps!

Yilun

这篇关于aws codecommit无法推送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆