# Installs a git helper function which retrieves the password or developer token from Secrets Manager # directly for cloning a repository from a private git repo or pushing back changes upstream. # Storing passwords and tokens in Secrets Manager eliminates the need to store any sensitive information on EFS. # Steps: # 1. Add your password or personal developer token to Secret Manager # 2. Set the secret name and key in the script below # 3. Clone your repository via HTTP with the user name in the url, e.g. "git clone http://username@github.com/...." #!/bin/bash set -eux ## Parameters # your git provider, e.g. github.com GIT_PROVIDER="github.com" GIT_USERNAME="" AWS_REGION="us-west-2" # Secret name stored in AWS Secrets Manager AWS_SECRET_NAME="my-git-credentials" # Secret key name inside the secret AWS_SECRET_KEY="github.com" ## Script Body PYTHON_EXEC=$(command -v python) cat > ~/.aws-credential-helper.py <