我是Amazon Web Services领域的新手,并且正在为我工作的公司实施持续交付。
我遵循了AWS的[配置CodeCommit服务的说明](http://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-https-windows.html#setting-up-https-windows-account)
步骤1:AWS CodeCommit的初始配置
要创建和配置用于访问AWS CodeCommit的IAM用户:我创建了一个新的IAM用户并给了他AWSCodeCommitFullAccess
要安装和配置AWS CLI:
我通过aws configure安装和配置了凭据。将AWS Access Key ID,AWS Secret Access Key,默认区域名称设置为us-east-1
和de
步骤2:安装Git我安装了Windows Git,请确保已清除“启用Git凭据管理器”选项。
步骤3:设置凭据助手
git config --global credential.helper "!aws codecommit credential-helper $@"
git config --global credential.UseHttpPath true
执行中:
git config --global --edit
我的配置是:
[http]<br> sslVerify = false
[credential]<br> helper = "aws codecommit list-repositories codecommit credential-helper " <br>UseHttpPath = true
步骤4:连接到AWS CodeCommit控制台并克隆存储库
$ git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/teste-git-to-s3<br>
Cloning into 'teste-git-to-s3'...<br>
git: 'credential-aws' is not a git command. See 'git --help'.<br>
Username for 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/teste-git-to-s3': Lucas<br>
fatal: unable to access 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/teste-git-to-s3/': The requested URL returned error: 403
在寻找AWS故障排除时,我发现:对AWS CodeCommit进行故障排除,但无法解决。
如何解决呢?
我认为问题出在您的.gitconfig文件中。将其更改为下面,它应该可以工作。
[credential]
helper = !aws codecommit credential-helper $@
UseHttpPath = true
顺便说一句,如果您使用的是Bash仿真器而不是Windows命令行,则必须使用单引号而不是双引号。
让我知道这是否无效。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句