gpt4 book ai didi

amazon-web-services - AWS CodeCommit 错误 : git: 'credential-aws' is not a git command

转载 作者:IT王子 更新时间:2023-10-29 01:27:36 27 4
gpt4 key购买 nike

我是 Amazon Web Services 的新手世界,我正在实现Continuous Delivery我工作的公司。

我按照 AWS 的[配置 CodeCommit 服务的说明] ( http://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-https-windows.html#setting-up-https-windows-account )

第 1 步:AWS CodeCommit 的初始配置

创建和配置 IAM user用于访问 AWS CodeCommit :我创建了一个新的 IAM 用户并给他 AWSCodeCommitFullAccess

安装和配置 AWS CLI:

我安装并配置了凭据做 aws configure .将 AWS 访问 key ID、AWS secret 访问 key 、默认区域名称设置为 us-east-1de

第二步:安装Git我安装了Git For Windows确保已清除启用 Git 凭据管理器选项。

第 3 步:设置凭证助手

git config --global credential.helper "!aws codecommit credential-helper $@"
git config --global credential.UseHttpPath true

执行:

git config --global --edit

我的配置是:

[http]
sslVerify = false
[credential]<br>
helper = "aws codecommit list-repositories codecommit credential-helper "
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 故障排除,我发现:Troubleshooting AWS CodeCommit但我无法解决它。

如何解决?

最佳答案

我认为问题出在您的 .gitconfig 文件中。将其更改为以下,它应该可以工作。

[credential]    
helper = !aws codecommit credential-helper $@
UseHttpPath = true

顺便说一句,如果您使用的是 Bash 模拟器而不是 Windows 命令行,则必须使用单引号而不是双引号。

如果这不起作用,请告诉我。

关于amazon-web-services - AWS CodeCommit 错误 : git: 'credential-aws' is not a git command,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39517908/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com