I receive the following error when doing a simple git pull
:
remote: Azure Repos
remote: Found 357 objects to send. (13 ms)
Receiving objects: 100% (357/357), 915.27 KiB | 614.00 KiB/s, done.
Resolving deltas: 100% (232/232), completed with 44 local objects.
error: unable to write file .git/objects/pack/pack-a1106a9b7ac7c2f544e979878a1468e633e5fb94.pack: Permission denied
fatal: cannot store pack file
fatal: index-pack failed
This appears to be a new problem but as far as I can figure out, nothing fundamental has changed on my machine since my previous successful pull.
I have tried to run the shell as admin but this too does not make a difference.
I am also able to create and delete files as per normal into this folder.
In the past I ran into similar problems as well. Several checks should be done before jumping to more advanced solutions. This is just a checklist taylored for your specific scenario.
git pull
command via CLI, make sure the CLI instance has proper authorization level. In case of Windows this would be "Run as administrator".git
can be a file OR a folder! Either is allowed from the perspective of the Windows filesystem!
.git/objects/pack/pack-a1106a9b7ac7c2f544e979878a1468e633e5fb94.pack
already exist?git pull
manually instead, i.e. attempt to create the file by handFor me personally I found the most common issue for being unable to change files was them being used by some other process. In my case most commonly such processes are compilers, active CLI instances, archive managers.
In case you still have the previous clone you might check and see if any of these apply to your case.
So I hesitantly post this as an answer but, alas, it is one. I deleted my repo and re-cloned and now I can git pull
again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With