一、问题背景
1、当我使用git 客户端链接亚马逊云代码仓库时报错:Codecommit:fatal: unable to access 'https://git-codecommit.us-west-2.amazonaws.com/v1/repos/gl-code-warehouse/': The requested URL returned error: 403。截图如下:
二、解决过程
1、执行以下命令进行鉴权配置:
git config --global credential.helper "!aws codecommit credential-helper $@"
git config --global credential.UseHttpPath true
执行截图如下:
命令运行后,会在 .gitconfig 配置文件中增加如下配置。
2、接下来就可以正常连接到云仓库,进行代码提交和拉取了。