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

질문됨 일 년 전967회 조회
4개 답변
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
전문가
답변함 일 년 전
  • 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
전문가
답변함 일 년 전
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.

답변함 일 년 전
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
답변함 9달 전

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

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

질문 답변하기에 대한 가이드라인

관련 콘텐츠