【发布时间】:2018-03-08 08:50:33
【问题描述】:
我可以成功克隆我的 CodeCommit 存储库,但是当我尝试推送到它时,我得到 403。但是,获取和拉取工作正常。好像我有只读权限。
我已将我的 .gitconfig 设置为使用 AWS CLI 作为凭证管理器:
[credential]
helper = !aws --profile builder codecommit credential-helper $@
UseHttpPath = true
问题是错误没有告诉我为什么推送失败:
$ git push origin test-branch
fatal: unable to access 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/my-example-repo/': The requested URL returned error: 403
互联网上关于他的错误的大多数问题都是克隆失败时,但克隆对我有用。我发现克隆成功和推送失败的这个问题,但他的错误是不同的 - aws codecommit cannot push。
编辑::查看我的 CodeCommit 政策后,它有 Full: Read Limited: List, Write:
还有一个ResourceSpecifier = foo-*,但它适用于GitPull 权限和拉动工作,所以我怀疑它是资源说明符。
【问题讨论】:
-
这是在mac还是windows上?
-
我在 Windows 上。
-
好的,你是如何在 windows 上使用 git 的?您是否安装了凭据管理器?使用 Eclipse?视觉工作室? Git Bash 还是 Cygwin?以及你如何使用 git 的版本。
-
我在官方网站上使用 git bash for Windows。但请记住,克隆和拉取已经起作用。您想到的大多数问题都会阻止我克隆,而不仅仅是推动。
-
您的用户拥有的完整 IAM 政策是什么?
标签: git amazon-web-services git-push aws-codecommit