ujj*_*arg 5 git amazon-web-services aws-codecommit
我有一个AWS账户。我在us-east-1地区创建了一个存储库。当我尝试从Mac的终端访问它时,出现错误消息fatal: repository 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/demo/' not found。我能够使用SourceTree GIT客户端访问此存储库。
我在加州地区创建了另一个存储库,并且能够从终端本身访问该存储库。
为什么我的Mac终端无法在特定的AWS区域中找到存储库?
Mic*_*ens 24
我按照 VonC 和 Uzair 提到的链接进行操作,并且在输入后我就可以使用 CLI git 命令来工作:
git config --global credential.UseHttpPath true
Run Code Online (Sandbox Code Playgroud)
谢谢 VonC。PS:确保您安装了当前版本的 git。CodeCommit 支持 Git 版本 1.7.9 及更高版本。
如果您使用 AWS 配置文件,则添加不带配置文件的凭证助手将使用您的 AWS CLI 设置的默认配置文件。为确保您使用的是 CodeCommit 存储库所在的相同配置文件/AWS 账户,您需要指定正在credential-helper使用的配置文件,如下所示:
git config --global credential.helper '!aws --profile HERE_YOUR_CLI_PROFILE_NAME codecommit credential-helper $@'
小智 9
使用以下命令
git config --global credential.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true
Run Code Online (Sandbox Code Playgroud)
检查 SourceTree 的 Git 配置是否与您的 Git 命令行不同:这个答案指出了设置:
[credential]
helper = /usr/local/bin/aws codecommit credential-helper $@
UseHttpPath = true
Run Code Online (Sandbox Code Playgroud)
即:AWS 的凭证助手可能尚未在命令行中为该特定存储库设置,而 SourceTree 使用的 Git(可以是嵌入的)将被正确设置。
| 归档时间: |
|
| 查看次数: |
4535 次 |
| 最近记录: |