I am trying to pull large files into a Docker container from git using git-lfs. Unfortunately, I keep getting the error:
...
---> f07e7087dc5a
Step 13/16 : RUN git lfs pull
---> Running in a387e389eebd
batch response: Git credentials for https://github.XXXX.edu/XXXXX/XXXXXXXXX.git not found.
error: failed to fetch some objects from 'https://github.XXXX.edu/XXXXX/XXXXXXXXX.git/info/lfs'
The command '/bin/sh -c git lfs pull' returned a non-zero code: 2
Any idea how to fix this and get my files pulled correctly and error-free? I am running the following in Docker to try to get git-lfs to work:
# Get git-lfs and pull down the large files
RUN apt-get update && apt-get install -y apt-utils && apt-get install -y curl
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
RUN apt-get install -y git-lfs
RUN git lfs install
RUN git lfs pull
I add my .gitattributes
file and .git
file to the Docker image as well.
EDIT: Can I maybe somehow use:
https://you:password@github.com/you/example.git
or
git config remote.origin.url https://you:password@github.com/you/example.git