cannot to clone codecommit with username in git url

3

I have one repo in CodeCommit, and I created one IAM account in IAM, for example my name is user01

I can use command, git clone https://my-repo-url.git to clone my repo, it is success.

but when i use clone https://user01@my-repo-url.git, i get 403.

I need to attach username to url, because i use third party service, it attach the username to git url

4 Answers
0

In my environment, I was able to clone the following.
If you do it with a username followed by a password, there should be no problem.

git clone https://username:password@my-repo-url.git
profile picture
EXPERT
answered a year ago
  • Yes I test it , your command "git clone https://username:password@my-repo-url.git " works.

    Does "git clone https://username@my-repo-url.git" works in your env?

  • No, if you do not include the password, it will fail with a 403 error.

0

Please put your settings in the following file.
".git/config"
Please change the URL as follows.

[remote "origin"]
url = https://username:password@my-repo-url.git
profile picture
EXPERT
answered a year ago
0

Is there any chance to see this working when specifying the username only? I need it to mirror an external repository to CodeCommit, and the interface (of the external repo) does not permit to specify the URL in the user:pwd form.

answered a year ago
0

Hello. We faced the same problem. The username is stored in the git config: remote.origin.url=https://username@git-codecommit.eu-west-1.amazonaws.com/v1/repos/repo and seems CodeCommit doesn't process this format of URL, it also returns 403. Could you please respond are there any reasons for such behavior or we should wait for a fix?

danila
answered 9 months ago

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