0

I know this issue has been posted about multiple times, but none of the answers on any other question has helped.

git fetch --depth=601 remote: Enumerating objects: 35562, done.
remote: Counting objects: 100% (35562/35562), done. remote:
Compressing objects: 100% (15646/15646), done. remote: Total 33626 (delta 17079), reused 32059 (delta 16512), pack-reused 0 (from 0)
Receiving objects: 100% (33626/33626), 14.29 GiB | 1.37 MiB/s, done.
Resolving deltas: 100% (17079/17079), completed with 639 local objects. error: unable to write file ./objects/pack/pack-0c3c6ff205bc4f01bb419b250e1389ba8ff35289.pack:
Permission denied fatal: cannot store pack file fatal: fetch-pack: invalid index-pack output

I am attempting to fetch changes to a bare repository. There were issues creating a clone of the repository, so depth = 1 was used. I have been increasing the depth count in an attempt to eventually unshallow this local bare repository.

When attempting to fetch at depth > 600, immediately after trying depth = 600, I started getting permission denied errors. Nothing at all changed about any circumstances between the depth = 600 fetch and the subsequent depth = 700 fetch, but permission was denied. I retried at 650, then 625, then finally 601 with the above message.

I have tried the following to resolve:

  • Restarted my machine
  • Run Git Bash in Admin and retry the commands
  • Uncheck Read-Only from the relevant .pack file
  • Force ownership and permissions on the file
  • Used Resource Monitor to check for any operating programs using the .pack file (there were none aside from Git for Windows, which I presume was Git Bash trying to operate on the file)

None of the above solutions have worked for me. Similar questions here on StackOverflow have accepted answers that do not resolve this issue for me, have no accepted answers, or do not pertain to a permission denied error on a .pack file.

I would rather resolve this issue directly rather than attempting to re-clone the repo, given that the repo is, at this point, many gigabytes in size and this entire attempt for a bare repository is to test removing many very large files (>2MB) with dozens to hundreds of commits each over the course of years by mirror pushing this repository to a new one before attempting it on the main repo.

Any assistance would be greatly appreciated. Every attempt at resolution takes some hours due to the commits immediately past 600 (as can be seen in the snippet).

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.