Luc*_*lva 18 git aws-codecommit
我是AWS世界的新手,我正在为我工作的公司实施持续交付.
我按照此说明配置CodeCommit服务:http://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-https-windows.html#setting-up-https-windows-account
步骤1:AWS CodeCommit的初始配置
创建和配置IAM用户以访问AWS CodeCommit:我创建了一个新的IAM用户并给了他AWSCodeCommitFullAcess
安装和配置AWS CLI:我安装并配置了执行aws configure的凭据(将AWS Access Key ID,AWS Secret Access Key,默认区域名称设置为us-east-1和de
步骤2:安装Git 我为Windows安装了GIT,确保清除了Enable Git Credential Manager选项.
第3步:设置凭证助手 我执行以下命令:
git config --global credential.helper "!aws codecommit credential-helper $@"
git config --global credential.UseHttpPath true
Run Code Online (Sandbox Code Playgroud)
执行:
git config --global --edit
Run Code Online (Sandbox Code Playgroud)
我有:
[http]
sslVerify = false
[credential]
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
Run Code Online (Sandbox Code Playgroud)
在aws上寻找故障排除解决方案,我发现:http://docs.aws.amazon.com/codecommit/latest/userguide/troubleshooting.html#troubleshooting-ae1但我无法解决它.
有谁知道如何解决这个问题?Pleeeeease,帮忙!
小智 20
我认为问题出在您的.gitconfig文件中.将其更改为下面,它应该工作.
[credential]
helper = !aws codecommit credential-helper $@
UseHttpPath = true
Run Code Online (Sandbox Code Playgroud)
顺便说一句,如果您使用的是Bash模拟器而不是Windows命令行,则必须使用单引号而不是双引号.
如果这不起作用,请告诉我.
| 归档时间: |
|
| 查看次数: |
5409 次 |
| 最近记录: |