내용으로 건너뛰기

aws codecommit credential-helper issue

0

Original issue: unable to access codecommit repos, returning 403 error. I am able to access it only when directly inputting credentials into the https string.

I am trying to troubleshot my aws cli credentials, but aws codecommit credential-helper get is not returning anything. I checked IAM permissions, reinstalled awscli, checked aws credentials.

질문됨 2년 전722회 조회
3개 답변
0

Did you create HTTPS Git credentials under iam user?

답변함 2년 전
  • Yes, I setup HTTPS Git credentials. Confirmed the user from aws configure.

-1

The following get-caller-identity command displays information about the IAM identity used to authenticate the request. The caller is an IAM user.

aws sts get-caller-identity

Example output:

{
    "UserId": "AIDASAMPLEUSERID",
    "Account": "123456789012",
    "Arn": "arn:aws:iam::123456789012:user/DevAdmin"
}

Ensure that the user DevAdmin has proper permission in the IAM policy (AWSCodeCommitPowerUser or another managed policy for CodeCommit access)

https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-https-unixes.html

전문가
답변함 2년 전
  • I checked the permissions and I have AWSCodeCommitPowerUser assigned. aws sts get-caller-identity also returns the correct user

  • what does 'aws sts get-caller-identity' show ?

  • it outputs a json object with my UserId, Account, and Arn. I checked my user and it has admin permissions. aws codecommit list-repositories gets me the correct repository, but aws codecommit credential-helper get is not returning anything.

-1

Ensure that your Git repository configuration is set up to use the credential helper. You can do this by verifying the .git/config file within your repository:

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

Try running the credential helper manually to see if it returns credentials:

aws codecommit credential-helper get

If this does not return anything, there might be an issue with your AWS CLI configuration or the credential helper itself.

Ensure that you are using the latest version of the AWS CLI, as updates might contain bug fixes and improvements:

aws --version

Enable debug logging for the AWS CLI to get more detailed output, which might help in identifying the issue:

aws codecommit credential-helper get --debug
전문가
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠