简体   繁体   English

git 克隆到 AWS Codecommit 存储库返回 403

[英]git clone to AWS Codecommit repo returns 403

I am trying to clone source code hosted in an AWS Codecommit Repo using HTTP-GRC method.我正在尝试使用 HTTP-GRC 方法克隆 AWS Codecommit Repo 中托管的源代码。

I have followed this setup guide: https://docs.aws.amazon.com/codecommit/latest/userguide/temporary-access.html?icmpid=docs_acc_console_connect#tc-role我已遵循此设置指南: https://docs.aws.amazon.com/codecommit/latest/userguide/temporary-access.html?icmpid=docs_acc_console_connect#tc-role

git clone codecommit::us-west-2://my-code-repo 
returns:
Cloning into 'common-ops-cdk'...
fatal: unable to access 'https://git-codecommit.us-west-2.amazonaws.com/v1/repos/my-code-repo/': The requested URL returned error: 403

Here's some info that might come handy understanding what's wrong:以下是一些有助于理解问题所在的信息:

$ git config --list
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
http.sslbackend=openssl
http.sslcainfo=C:/Users/myusername/AppData/Local/Programs/Git/mingw64/ssl/certs/ca-bundle.crt
core.autocrlf=true
core.fscache=true
core.symlinks=false
pull.rebase=false
credential.helper=manager-core
credential.https://dev.azure.com.usehttppath=true
init.defaultbranch=master
credential.helper=!aws codecommit credential-helper $@
credentials.helper=UseHttpPath=true

Any insights will be helpful.任何见解都会有所帮助。 Thanks!谢谢!

You need to create an IAM user with access to CodeCommit, then go to Security Credentials for that user and under the HTTPS Git credentials for AWS CodeCommit section select the Generate Credentials button. You need to create an IAM user with access to CodeCommit, then go to Security Credentials for that user and under the HTTPS Git credentials for AWS CodeCommit section select the Generate Credentials button.

Use these to authenticate against the AWS git repo使用这些对 AWS git 存储库进行身份验证

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM