Checkout fails with unsafe repository fatal error
See original GitHub issueThe ci workflow in gitfool/Pulumi.Dungeon is suddenly failing to checkout source via actions/checkout@v3.0.0
:
Deleting the contents of '/__w/Pulumi.Dungeon/Pulumi.Dungeon'
##[group]Initializing the repository
[command]/usr/bin/git init /__w/Pulumi.Dungeon/Pulumi.Dungeon
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /__w/Pulumi.Dungeon/Pulumi.Dungeon/.git/
[command]/usr/bin/git remote add origin https://github.com/gitfool/Pulumi.Dungeon
##[error]fatal: unsafe repository ('/__w/Pulumi.Dungeon/Pulumi.Dungeon' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory /__w/Pulumi.Dungeon/Pulumi.Dungeon
##[error]The process '/usr/bin/git' failed with exit code 128
The only relevant change I can think of is that the git version used by gitfool/cake-docker was bumped from 2.35.1
to 2.35.2
. 😕
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top Results From Across the Web
git - Fatal error "unsafe repository ('/home/repon' is owned by ...
It happens because I have git rev-parse --symbolic-full-name --abbrev-ref HEAD' in PHP code, and it looks like the new Git safety change no ......
Read more >`fatal: unsafe repository (REPO is owned by someone ... - GitHub
The quick fix is to add a step before the checkout action to run git config --global --add safe.directory <path> . The better...
Read more >Unsafe repository (REPO) is owned by someone else
I'm trying to pull some updates to my production repository, in a ubuntu server, but when i try to run any git command,...
Read more >Solution to GIT: "unsafe repository ('some-repo' is owned by ...
This post looked at what causes the unsafe repository ('some-repo' is owned by someone else) Git error. We said that this error occurs...
Read more >Fix Git's 'fatal: repository not found' error quickly | TheServerSide
If all else fails, check with the team lead to ensure that the remote repository does indeed still exist. One way to fix...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is - there’s more information on our blog. We’re looking at ways that
actions/checkout
can improve this experience in the common cases.This is the same as #760. The proximate trigger is a security fix in Git v2.35.2; you can work around the issue by making the config change suggested, but a long-term fix will, I think, need a change to the GitHub runner environments.