I encountered an issue when trying to clone a project from GitHub. The cloning process would reach “receiving objects: 99%”, pause briefly, then jump to 100%, and the following error messages appear:
fatal: could not open '/Users/vendys-sangheun/Desktop/corp-api/.git/objects/pack/tmp_pack_thfc2z' for reading: Operation not permitted
fatal: fetch-pack: invalid index-pack output
Interestingly, when I use the –depth 1 option, the clone works perfectly fine. Also, while not all projects work, I can successfully clone some of them. I think this issue only occurs with larger projects.
What could be causing this problem, and how can I resolve it?
I tried cloning the GitHub project using the standard git clone command and expected it to work without any issues. However, I encountered the error mentioned earlier. I also tried running the command with sudo, but that didn’t resolve the issue either.
While using the –depth 1 option allowed me to clone the repository, when I later attempted to run git fetch to retrieve the full commit history, the same error occurred. I expected the full history to be fetched without any errors after cloning with –depth 1.
I tried the following settings, but it still doesn’t work:
git config --global pack.packedGitLimit 1g
git config --global pack.packedGitWindowSize 128m
git config --global pack.packSizeLimit 5g
git config --global pack.windowMemory 256m