Mirror GitLab repository to CodeCommit with username in URL

0

Hi everyone,

started from this rePost question, but I need additional help.

I have an issue while configuring a push repository mirroring to CodeCommit. Everything is fine on the configuration side, both IAM user and repository permissions. If, from my laptop, I try to ls-remote the CodeCommit repository without username in the URL, everything goes fine:

git ls-remote https://CODECOMMITBASEURL/v1/repos/MY_REPO
7166b33079ff40dd375b353a39555e2cba770cd1	HEAD
e5fcd95f83f89d208fa00d0a8466bff2065593ce	refs/heads/develop
7166b33079ff40dd375b353a39555e2cba770cd1	refs/heads/main

(username and password inserted via terminal)

If, instead, I try with the username@URL, an error message appears:

git ls-remote https://MY_USER@CODECOMMITBASEURL/v1/repos/MY_REPO fatal: unable to access 'https://CODECOMMITBASEURL/v1/repos/MY_REPO/': The requested URL returned error: 403

The same command works if I specify username and password in the URL, but this is not currently feasible within the GitLab's “Mirroring Repositories” section. Other Git providers (like GitLab itself) work even in the username@URL form. I think I'm not able to change this setting (the username@URL pattern) on the other side.

Is there a way to accomplish this? Thanks in advance!

asked a year ago116 views
No Answers

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