Configure git with AWS CodeCommit credential helper
This would allow working with AWS CodeCommit with temporary IAM credentials available in JupyterLab and CodeEditor when using the SageMaker Distribution in SageMaker Studio.
git config --global credential.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true
Hi @giuseppeporcelli can you provide us with any verification steps? (for my local docker image)
We have same problem where codeeditor isnt able to communicate with codecommit out of the box. Similar to the git config commands proposed by @giuseppeporcelli , we are using LCC to set the gitconfig in the home directory. Email and User are resolved by fetching tags on the execution role but that part is probably not generally viable so I excluded those parts.
echo "Email: $USER_EMAIL"
echo "User: $USER_NAME"
GIT_CONFIG_PATH="$HOME/.gitconfig"
cat > $GIT_CONFIG_PATH << GITCONFIGEOF
[user]
name = $USER_NAME
email = $USER_EMAIL
[credential]
helper = !aws codecommit credential-helper \$@
UseHttpPath = true
GITCONFIGEOF
Given that AWS is deprecating Code commit, is this request necessary? Closing this issue. Feel free to reopen if this is still required. Ref: https://aws.amazon.com/blogs/devops/how-to-migrate-your-aws-codecommit-repository-to-another-git-provider/