CodeCommit auth fail

0

Trying to access a repo on CodeCommit is giving 403. Can only access it from root user on cloudshell from aws. From anywhere else its blocked. Tried everything I could find. Reset credentials, played around with IAM permissions. Nothing helped.

klaz
asked 25 days ago59 views
2 Answers
0
Accepted Answer

I gave up on trying to setup https connection to CodeCommit. Instead I setup ssh and it works fine. Closing this question.

klaz
answered 23 days ago
profile picture
EXPERT
A_J
reviewed 12 days ago
0

Hello.

Did you issue Git credentials from an IAM user using the steps in the document below?
Try entering the issued credentials for the username and password you enter when executing "git clone".
https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html

profile picture
EXPERT
answered 25 days ago
  • I did setup GIt credentials btw

  • Its not prompting me to enter username or password. Just giving fatal: unable to access 'git-codecommit.us-west-2.amazonaws.com/v1/repos/my-repo-name: The requested URL returned error: 403

  • When you run the following command in CloudShell, you will be asked for a username and password. I actually ran it using my AWS account, but it asked for a username and password. When actually executing the command, remove the space after "https://".

    git clone https:// git-codecommit.us-west-2.amazonaws.com/v1/repos/my-repo-name
    
  • Running it in cloudshell is not a problem, it works like expected. However, getting access to it anywhere else gives me 403 error without prompting me for username and password. For context: aws codecommit list-repositories works like expected, but git ls-remote codecommit-origin is not accessible. If I try to access https:// git-codecommit.us-west-2.amazonaws.com/v1/repos/my-repo-name from a browser it prompts me for credentials but after inputting them it also returns Invalid request.

  • Troubleshooting differs depending on whether the OS of the local PC you are using is Mac or Windows, but you can troubleshoot using the method described in the document below, so please check it. https://docs.aws.amazon.com/codecommit/latest/userguide/troubleshooting-ch.html#troubleshooting-macoshttps

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions