fatal: unsafe repository ('' is owned by someone else)
See original GitHub issueDoes this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: 1.67
- OS Version: Win 21H2
Steps to Reproduce:
- Use the openRepository command to open a repo that is not added to âsafe.directoryâ
- reference: https://github.com/microsoft/vscode/commit/6b241a6845d17992a5a754d5eaf32fd1824ef74e
- There is a caught exception that states the following
'fatal: unsafe repository ('' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory
Obviously, for security purposes, an extension wouldnât want to just add this value for the user, so it would be nice to provide the same dialog that vsCode uses (though for a different purpose), that asks the user if they want to trust the repository.
You could certainly say that this is not a vsCode issue and that such a dialog shouldnât be handled internally by vscode, and I wouldnât be able to argue. In the meantime, I would probably look into prompting the user for trust and then use âchild_processâ to exec git config globalâ Could you at least point me to where I can pick up the error without just debugging all âCaughtExceptionsâ?
Issue Analytics
- State:
- Created a year ago
- Reactions:16
- Comments:9
Top Results From Across the Web
git - Fatal error "unsafe repository ('/home/repon' is owned by ...
you will get this error, so make sure you have appropriate directory permission. You can change the directory ownership by running chown or...
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
Create a .gitconfig file in /var/www directory, which is the home for www-data user, with the following content : ¡ Add the folder...
Read more >`fatal: unsafe repository (REPO is owned by someone ... - GitHub
This issue seems only happens for workflows based on docker container, workflows directly running on runners is not affected. git config --Â ...
Read more >Git: Unsafe repository is owned by someone else (Windows)
Git: Unsafe repository is owned by someone else (Windows) ¡ Open Windows âExplorerâ and go to the repository where the error occurred ¡...
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
VS Code needs to at least acknowledge the unsafe repository status from GIT instead of indicating âno repository here, make one?â, when making one still wonât work.
I downgraded from VS Enterprise 2022 to VS Professional 2022 and I get this error. Running my new version of VS as Administrator fixed this issue for me