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

gefragt vor einem Jahr964 Aufrufe
4 Antworten
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
EXPERTE
beantwortet vor einem Jahr
  • 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
EXPERTE
beantwortet vor einem Jahr
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.

beantwortet vor einem Jahr
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
beantwortet vor 9 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen