Add a way to use private repositories on GitHub (#869)

This commit is contained in:
Lars Gohr 2022-09-23 10:32:26 +02:00 committed by GitHub
parent e244c811ea
commit 7ea37bbdc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,4 +4,8 @@
# provides all arguments concatenated as a single string. # provides all arguments concatenated as a single string.
ARGS=("$@") ARGS=("$@")
if [[ ! -z "${GITHUB_AUTHENTICATION_TOKEN}" ]]; then
git config --global --add url."https://x-access-token:${GITHUB_AUTHENTICATION_TOKEN}@github.com/".insteadOf "https://github.com/"
fi
/bin/gosec ${ARGS[*]} /bin/gosec ${ARGS[*]}