Skip to content

Instantly share code, notes, and snippets.

@rms1000watt
Last active September 10, 2019 18:36
Show Gist options
  • Save rms1000watt/7e81354ddca5a5eabb19481ed35610f8 to your computer and use it in GitHub Desktop.
Save rms1000watt/7e81354ddca5a5eabb19481ed35610f8 to your computer and use it in GitHub Desktop.
Dockerfile Adding github access token for private github repos
FROM alpine
ARG GITHUB_ACCESS_TOKEN
RUN apk update && \
apk add -U git && \
git config --global url."https://${GITHUB_ACCESS_TOKEN}:[email protected]/".insteadOf "https://github.com/" && \
# Then when you're done doing stuff... clean up
rm -rf ~/.gitconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment