2015-11-21 109 views
1

我试图在Windows 10上使用AWS CodeCommit和GIT和openSSH。我可以成功连接腻子,但我不想使用它。 我在〜/ .ssh/id_rsa中创建了一个密钥并将其上载到AWS Console。 所以,如果我尝试在GitBash中连接ssh而不是它的工作。AWS Codecommit和GIT openSSH连接

$ ssh git-codecommit.us-east-1.amazonaws.com 
You have successfully authenticated over SSH. 
You can use Git to interact with AWS CodeCommit. 
Interactive shells are not supported. 
Connection to git-codecommit.us-east-1.amazonaws.com closed by remote host. 
Connection to git-codecommit.us-east-1.amazonaws.com closed. 

但是,如果我试图拉它不起作用。

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

Please make sure you have the correct access rights 
and the repository exists. 

我检查了我的SSH密钥ID,它是正确的。

$ git remote -v 
origin ssh:/***********@git-codecommit.us-east-1.amazonaws.com/v1/repos/myrepo (fetch) 
origin ssh:/***********@git-codecommit.us-east-1.amazonaws.com/v1/repos/myrepo (push) 

SSH连接接缝也与我的SSH密钥ID工作:

$ ssh ***********@git-codecommit.us-east-1.amazonaws.com 

我成功配置它的另一个Windows PC上一个星期。

有没有人有同样的问题?任何想法什么是错的?

+0

至少从git中的输出中提供,并且你的ssh密钥是有效的,它似乎是你没有访问的那个特定的git仓库 – Raghav

+0

我总是获得Permission拒绝,即使我的ssh密钥无效。 – CyberAleks

+0

您配置的其他Windows PC正在使用另一个IAM用户。一个附加了正确的CodeCommit策略。尝试比较两个IAM用户。 (并在这里发布提示,我有完全相同的问题:-) – klang

回答