“git fsck显示fatal: mmap失败: 操作超时”

huangapple go评论75阅读模式
英文:

git fsck shows fatal: mmap failed: Operation timed out

问题

突然间,我的一些 Git 存储库在执行 git 命令时出现“fatal: mmap failed: Operation timed out”的错误。我之前在 GitHub Desktop 上操作,同时在多个分支上进行工作。我对更改进行了暂存,并在分支之间切换。突然有一天,我看到 GitHub Desktop 报错“无法找到存储库,它最后出现在”。于是,我执行了 git 命令,似乎 Git 存储库已经损坏。有没有办法解决这个问题。

英文:

Suddenly some of my git repos are failing with fatal: mmap failed: Operation timed out on executing git cli commands.

I was using github desktop , have been working on multiple branches on the repos. Stashed changes and moved between the branches. Suddenly one day i see github desktop complains with Cannot find repository , it was last seen at .

So, i executed the git cli commands and it seems the git repos got corrupted.

Any way to come out of this problem.

答案1

得分: 2

这是之前看到过的,主要与操作系统特定问题有关(比如MacOS上的中断系统调用)。

GitHub Desktop 包含自己的Git,所以首先尝试:

  • 升级Git(在GitHub Desktop之外)到最新版本。
  • 然后检查问题是否仍然存在(再次使用最新的Git版本,在GitHub Desktop之外的命令行中)。
  • 卸载/重新安装GitHub Desktop。

如果问题仍然存在,请检查在一个单独的文件夹中克隆存储库,并从先前的本地文件夹导入您的工作,看是否可以接受。

英文:

This was seen before, mostly related to an OS-specific issue (like interrupted syscall on MacOS for instance)

GitHub Desktop includes its own Git, so try first to:

  • upgrade Git (outside of GitHub Desktop) to its latest version
  • check if the issue persists then (again, using that latest Git version, from a shell outside GitHub Desktop)
  • uninstall/reinstall GitHub Desktop.

If the issue persists, check if cloning the repository (in a separate folder) and importing your work from your previous local folder would be an acceptable workaround.

huangapple
  • 本文由 发表于 2023年4月10日 21:52:22
  • 转载请务必保留本文链接:https://go.coder-hub.com/75977717.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定