francescou / docker-compose-ui

web interface for Docker Compose
http://francescou.github.io/docker-compose-ui
MIT License
1.54k stars 228 forks source link

How to access private Git repo? #100

Closed bergtwvd closed 7 years ago

bergtwvd commented 7 years ago

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 7 years ago

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 7 years ago

Thanks. Newbie to GIT. :-).