How to access private Git repo?
bergtwvd opened this issue · 2 comments
bergtwvd commented
I have used the GIT_REPO env for a public Github project. Works ok.
But how to use this for a private company Git repo?
How do I pass in my private key and username/password for this repo?
francescou commented
you can add basic auth this way:
docker run --name docker-compose-ui \
-p 5000:5000 \
-w /opt/docker-compose-projects-git/ \
-v /var/run/docker.sock:/var/run/docker.sock \
-e GIT_REPO=https://username:password@gitlab.com/username/my-project.git \
francescou/docker-compose-ui:1.8.1
if you're using gitlab simply create a new personal access token (with "api" scope) and use it as a password
bergtwvd commented
Thanks. Newbie to GIT. :-).