unsafe repository owned by someone else

173 views
Skip to first unread message

Daniel Kaminski

unread,
Mar 25, 2023, 10:04:07 AM3/25/23
to git-for-windows
Could anyone help me resolve this issue regarding unsafe repository owned by someone else?
I get the following message when opening a Visual Studio project
2023-03-25_09-58-53.jpg

After running the suggested git config command --global --add safe.directory

The config file looks like the image below but the error persists.
2023-03-25_09-31-06.jpg

Philip Oakley

unread,
Mar 25, 2023, 12:46:23 PM3/25/23
to git-for-windows
There is a GitHub revocation of SSH keys at the moment - see https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/
Possibly not the same problem but when apps do their own error messages then it's easy to be confused.

Daniel Kaminski

unread,
Mar 27, 2023, 11:13:17 AM3/27/23
to git-for-windows
Thanks, but not sure that is it since I don't use github and the issue is in my local machine.

Mark Mikofski

unread,
Mar 27, 2023, 2:30:46 PM3/27/23
to git-for-windows
Hi Daniel,

The path looks wrong in your .gitconfig for the safe directory. I think the "mac/home/ was an example? Can you try to put the path to the folder that has your .git file in the .gitconfig file.


Note that if using the command line git config --global --add safe.directory "path\\to\\file\\on\\windows" then according to Issue #3856 you will need double quotes for windoes.

Cheers,
Mark

Dale Ogilvie

unread,
Apr 18, 2023, 4:55:01 PM4/18/23
to git-for-windows

I am seeing the same issue. In my case, the problem is that git clone is creating folders and files owned by BUILTINS/Administrators instead of my user, even though I am doing the clone in an unprivileged cmd shell.

When this happens git refuses to allow manipulation of the cloned repo, as the ownership is different to the current user. Perhaps the op could verify the ownership of their cloned repo. In a powershell, the following will show ownership.

Get-Acl .  

Johannes Schindelin

unread,
Sep 3, 2023, 6:43:30 AM9/3/23
to Dale Ogilvie, git-for-windows
Hi Dale,

that sounds like something in your setup assigns ownership to
administrators, which is not something we can handle at the time.

Can you find out what causes this (to me, unexpected) behavior?

Ciao,
Johannes


On Mon, 10 Apr 2023, Dale Ogilvie wrote:

>
> I am seeing the same issue. In my case, the problem is that git clone is
> creating folders and files owned by *BUILTINS/Administrators* instead of my
> --
> You received this message because you are subscribed to the Google Groups "git-for-windows" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to git-for-windo...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/git-for-windows/52ca3626-85d8-4158-923f-67be81a8d19bn%40googlegroups.com.
>
Reply all
Reply to author
Forward
0 new messages