add git-credential-env

and configure git to use it by default

`git-credential-env` only echoes the $GIT_CREDENTIAL_ENV environment variable
when git asks for https credentials.

with this, setting GIT_CREDENTIAL_ENV="username=name\npassword=xxx" sets the credentials
that will be used.

e.g.

    docker run -e GIT_CREDENTIAL_ENV="username=name\npassword=xxx" jupyter/repo2docker https://github.com/private/repo
pull/144/head
Min RK 2017-11-17 15:59:15 +01:00
rodzic 0d3becd0b4
commit 504aeb7300
2 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -5,5 +5,6 @@ RUN apk add --no-cache git
RUN mkdir /tmp/src
ADD . /tmp/src
RUN pip3 install --no-cache-dir /tmp/src
RUN pip3 install --no-cache-dir /tmp/src && \
cp /tmp/src/docker/git-credential-env /usr/local/bin/git-credential-env && \
git config --system credential.helper env

Wyświetl plik

@ -0,0 +1,2 @@
#!/bin/sh
echo -e $GIT_CREDENTIAL_ENV