I'm trying to set up a multi-stage docker build and needing to cloning my sources for the initial first stage build step.
However, git clone
requires a username/password as the path to the repository is on a private github enterpr server. Under normal circumstances git will prompt you for the username/password. However, with git clone started from a RUN
step in the Dockerfile there is no such prompt and the output is simply:
fatal: could not read Username for 'https://yourserver.com': No such device or address The command '/bin/sh -c git clone https://yourserver.com/name/yourpath' returned a non-zero code: 128
Even with the -ti
flag specified in the docker build step.
How do I pass the username/password or at least prompt for it? I don't want this embedded in the Dockerfile.