-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
Issue
If running a job that uses a container like the below, the file /github/home/.gitconfig
will not exist, even after checkout runs a config command.
example:
runs-on: ubuntu-latest
container:
image: alpine
- Checkout runs, and runs
/usr/bin/git config --global --add safe.directory /__w/sat/sat
- The global .gitconfig does not exist
- Any calls to git remain unsafe/dubious
The safe.directory
settings set by the command git config --global --add safe.directory <path>
is a no-op.
Workaround
Use the --system
scope over --global
:
$ git config --system --add safe.directory <path>
example:
runs-on: ubuntu-latest
container:
image: alpine
steps:
- uses: actions/checkout@v3
- run: git config --system --add safe.directory <path>
AllanOricil, knaeckeKami, kobaltcore, hardisty, busybeaver and 40 more
Metadata
Metadata
Assignees
Labels
No labels