我成立CodeCommit SSH訪問和測試連接:IAM阻止訪問AWS CodeCommit回購
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.
當我嘗試克隆或推,我看到這個錯誤:
Access denied: User: arn:aws:iam::##########:user/[email protected] is not authorized to perform: codecommit:GitPull on resource: arn:aws:codecommit:us-east-1:##########:my-repo
即使在向我的用戶添加策略以訪問此回購庫上的所有操作後,我無法克隆或推送。
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"codecommit:*"
],
"Resource": [
"arn:aws:codecommit:us-east-1:##########:my-repo"
]
}
]
}
什麼給?其他人有沒有這個問題?
您是否還添加了IAMUserSSHKeys和IAMReadOnlyAccess的策略?請參閱http://docs.aws.amazon.com/codecommit/latest/userguide/how-to-share-repository.html#how-to-share-repository-IAMgroup。 PS您應該爲IAM組執行此操作,然後將用戶添加到該組,而不是將單個策略添加到IAM用戶。 – jarmod
是的,建立一個包含這些策略的組和我描述的策略。 –