0

I keep my git repositories locally ( created them using git init --bare )

After Windows reinstall, and trying to add existing repositories in GitHub Desktop and SmartGit, for certain repos I get these errors:

github desktop:
fatal: git show-ref bad ref refs/tags/version1 (bbafdafd..)
fatal: failed to read object 131j31lkj31l2j3l1kj2: Permission denied

smartGit: 
Failed to read pack 'E:\Solution\..git\objects\pack\pack-157..ab3ef1.idx'

My solutions:

If I start smartgit/github desktop as Administrator I don't have this issues,

Another solution I found is to copy the git source (.git folder created with git init --bare) and clone the copied folder instead of the original.

Does anyone know what is happening here, why am I getting these problems with certains repos ?

EDIT: Trying to clone a repo using Git GUI I got this error:

fatal: detected dubious ownership in repository at 'E:/w/git/MySolution.git'
'E:/w/git/AweCore.git' is owned by:
    'S-1-5-21-2433683594-...'
but the current user is:
    'S-1-5-21-2676...'
To add an exception for this directory, call:
git config --global --add safe.directory E:/git/MySolution.git

so it appears to me that when I created the repo using git bare, the repo somehow got attached to the windows user, and now after windows new installation I'm getting this issue

buga
  • 852
  • 9
  • 21

0 Answers0