【发布时间】:2020-10-21 10:10:07
【问题描述】:
当我尝试在我的 MAC 上克隆一个新的代码提交 repo 时,我收到 403 错误。我完全不知道我需要做什么才能让 2 个不同的帐户正常工作。
当我运行 git config -l --show-orgin 我有这些设置。
$ git config -l --show-origin
file:/Library/Developer/CommandLineTools/usr/share/git-core/gitconfig credential.helper=osxkeychain
file:/Users/username/.gitconfig user.email=firstnamelastname@company.com
我的 .aws/credentials 文件包含来自第一个帐户的以下内容
[default]
aws_access_key_id=xxxxxx
aws_secret_access_key=xxxxxxxxxxxxxxxx
我的凭证-helper.sh。文件包含来自第一个代码提交帐户
echo username="[xxxxxxxx]"
echo password="[xxxxxxxxxxxxx]"
我是代码提交的新手,不确定我需要编辑什么才能克隆第二个 repo。
当我尝试克隆到它时,我收到以下错误:
fatal: unable to access 'https://git-codecommit.xxxxxxxxx/v1/repos/xxxxxxxx/': The requested URL returned error: 403
我在这里缺少什么?我们还没有在第二个帐户上设置 ssh,暂时只是使用用户名和密码。
【问题讨论】:
标签: git macos aws-codecommit