No permission for .git/objects

I am trying to make a auto-pull from gitlab. I can no longer pull. The following is the error that happens when I attempt to pull:

$ git pull
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed

Hi @NicksWorld,

can you check if your disk is full?

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          49G   27G   23G  55% /
tmpfs            64M     0   64M   0% /dev
tmpfs            15G     0   15G   0% /sys/fs/cgroup
/dev/rbd91      128M   21M   97M  18% /app
/dev/xvda1       49G   27G   23G  55% /tmp
shm              64M     0   64M   0% /dev/shm
tmpfs           256M  3.4M  253M   2% /etc/hosts
/dev/xvdp1      100G   49G   51G  49% /rbd/pnpm-volume/81124a25-3da9-4165-8a2b-985178bea002
/dev/xvdp1      100G   49G   51G  49% /rbd/pnpm-volume/store/2/server
udev             15G     0   15G   0% /dev/tty
tmpfs            15G     0   15G   0% /proc/scsi
tmpfs            15G     0   15G   0% /sys/firmware

then probably something in your code changed the write/access permissions on the .git directory. Try to run chmod -R +wx .git and then git pull again.

I get permission errors from it:

$ chmod -R +wx .git
chmod: changing permissions of '.git/objects/20': Operation not permitted
chmod: changing permissions of '.git/objects/20/75389fac1c992bff99c2e8cdc12881b9a2ea3e': Operation not permitted
chmod: changing permissions of '.git/objects/e2': Operation not permitted
chmod: changing permissions of '.git/objects/e2/09e40fba733faddfb119f07506b0e1607f757f': Operation not permitted

Same error as before from git pull.

Unfortunately I can’t investigate further right now. If you tell me your project domain, I can look at it tomorrow.

Well, thank you for responding so quickly today, the domain is https://spot-bot.glitch.me

I have the same issue (No permission for writing in .git/objects upon git pull, git fetch), and I am, too, trying to make an auto pull from Gitlab. My disk is not full:

image

Seems weird. My project is private, I’ll direct message the join link to you.

Thanks.

Much better to send that to support@glitch.com; DMs are not guaranteed to result in prompt attention - for instance etamponi may not see that for a while.

In fact if your project is private, posting the project name here doesn’t provide any benefit except to some Glitch staff members; no one else will be able to see your project unless you explicitly invite them.

1 Like

Ah thank you. I messaged the join link to him not the project name :stuck_out_tongue. I’ll pop an email through later, thanks.

Soooo, I just wiped the contain with rm -rf ./*, and then git pull worked without errors, weird haha, but the problem is resolved, and my auto deploy is also working :slight_smile:
Thanks for the attention.

Well, removing all the files would certainly resolve any permissions problems, yes :smiley:

Glad it’s working again!

1 Like