6

I've got a repository that I've had for years, using through GitKraken. I just used the CLI to assign a tag (using the code git tag -a v0.7.1 -m "my version 0.7.1" ea27f3b3ab882e58cbb5995f5d8638a200676a43 then git push --tags) to the repo, and after that GitKraken will not open it. It says there's no repository there and asks if I want to initialize a new repo.

There are no problems with any of my other repos. Also, this repo works fine from the command line. I've tried deleting the folder manually, then cloning it again from github in the same place, but it didn't help. I've also tried git reset --hard locally, but to no use. Some google searching shows up things like long path names on deeply nested files, but I don't have that (and I'm on MacOS not Windows).

Any ideas?

Michael K. Borregaard
  • 7,864
  • 1
  • 28
  • 35

4 Answers4

3

I got the same error when I tried to open a repository. When I tried to clone any repository, I got the message:

"C:/Users/Username/.gitconfig": Access Denied

I deleted the file, now both messages are gone.

Anyone who tries this should save the file elsewhere just in case.

Gabriel Vianna
  • 151
  • 1
  • 6
1

This was resolved by Jake from the GitKraken team, on the GitKraken slack. I'll post the solution here if it may help someone in the future.

It appeared I had two malformed refs in my repository, one to my master branch, the other to that v0.7.1 tag I mentioned above. Deleting the tag, and the master branch, resolved the issue.

Michael K. Borregaard
  • 7,864
  • 1
  • 28
  • 35
0

to fix this issue i used visual studio code, i opened it on the IDE and used the extension to commit all the files inside the folder. Here is a link to the found solutionThe link to a website

Klod Lala
  • 153
  • 8
0

I just had this same issue with GitKraken. It would keep presenting this "compatible repository" message even though it would load the repo and let me stage and browse commits. However, after about a minute, it would unload the repo and start trying to load it again, but just hang trying to load. Other tools (Giggle, gitg, git-gui, and the git CLI) all seemed to work just fine.

A Solution

Digging a little deeper I found that, apparently, something got corrupted in my reflog. You can inspect the files in .git/logs/refs/heads/* and .git/logs/refs/remotes/*/* for any lines that look extremely unusual. All of the lines should look very much the same (from-hash, to-hash, timestamp, user, message, and so on). The corrupted lines in my log had loads of strange symbols and were like 4 time the length of the other lines. Very obvious.

I also found some zero byte objects, which should not be. Those are temp files that should have been filled with data or deleted but were not, for... reasons. They can safely be deleted.

find .git/objects -size 0 -type f -delete

The Nuclear Option

To get my GitKraken working again, I need to go with the Nuclear Option.

Ok, if you are still having trouble and are CERTAIN that you do not need anything in your reflog, INCLUDING YOUR STASH, you can expire all of it now and clean up (garbage collect) the dangling refs:

git reflog expire --expire=now --all
git gc --prune=now

Well, I guess that there is an even more extreme step, in that you could delete the repo and re-clone but you would lose all local branches, stashes, and unpushed commits. I wasn't okay with that.

Karl Wilbur
  • 5,898
  • 3
  • 44
  • 54