question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`fatal: unsafe repository (REPO is owned by someone else)` with ubuntu 20.04 container

See original GitHub issue

Hello!

This started happening recently; I see it both with v2.4.0 and v.3.0.0:

Syncing repository: wez/wezterm
Getting Git version info
Deleting the contents of '/__w/wezterm/wezterm'
Initializing the repository
  /usr/bin/git init /__w/wezterm/wezterm
  Initialized empty Git repository in /__w/wezterm/wezterm/.git/
  /usr/bin/git remote add origin https://github.com/wez/wezterm
  Error: fatal: unsafe repository ('/__w/wezterm/wezterm' is owned by someone else)
  To add an exception for this directory, call:
  
  	git config --global --add safe.directory /__w/wezterm/wezterm
  Error: The process '/usr/bin/git' failed with exit code 128

Is there a way to configure/advise the action how to handle this? Is this really a problem elsewhere in the GH actions environment?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:181
  • Comments:92 (2 by maintainers)

github_iconTop GitHub Comments

81reactions
cbalioglucommented, Apr 13, 2022
55reactions
thboopcommented, Apr 13, 2022

Thanks for the report, our team is working on a fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

git - Fatal error "unsafe repository ('/home/repon' is owned by ...
Here are four possible solutions: trust the Git directory (do it if you know the directory contents are safe)
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 >
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 >
What to do when Git reports Fatal: Unsafe Repository
Earlier this month - April 2022 - Git released an update (2.35.2) to fix a security vulnerability. The problem was that on multi-user...
Read more >
install latest git client from PPA to fix 'unsafe repository' errors ...
Since the announcement of CVE-2022-24765, newer git clients from the Ubuntu security and archive package repositories may throw errors about ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found