I have an AWS CodeCommit repo created in eu-central-1. I am planning to Synchronize a repo in GitHub to AWS CodeCommit. All the present code and future PR's merging to main and preprod should be in the AWS CodeCommit.
I am using this script to script from GitHub actions in my Jenkins stage
git config --global credential.'https://git-codecommit.*.amazonaws.com'.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true
git remote add sync https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/test-repo
git push sync --mirror
I get the following error
fatal: could not read Username for 'https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/test-repo': No such device or address
The job where Jenkins job is running has a role attached to the instance and it has full permissions on CodeCommit. Am I missing any prerequisites or have to execute any prerequisites before mirroring to resolve the above issue?