Skip to content

Add .git to dockerignore and clone git repo inside the image#4

Open
haberbyte wants to merge 1 commit into
basecamp:mainfrom
haberbyte:haberbyte/git-clone
Open

Add .git to dockerignore and clone git repo inside the image#4
haberbyte wants to merge 1 commit into
basecamp:mainfrom
haberbyte:haberbyte/git-clone

Conversation

@haberbyte

Copy link
Copy Markdown

I had some authentication problems inside the container when building the image with Github Actions. I am guessing it is because some other credentials were pre-setup in the .git/config at the time of the docker build. Pulling with my fine-grained token then didn't work anymore inside the container.

Not sure if I am missing something, but currently it seems to depend on your local .git folder at the time of the docker build if things work. This PR fixes it by ignoring the .git/ folder and cloning the bare repo on first boot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant