No permission for .git/objects


#1

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

#2

Hi @NicksWorld,

can you check if your disk is full?


#3
$ 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

#4

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.


#5

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.


#6

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


#7

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


#8

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.


#9

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.


#10

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.


#11

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.


#12

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

Glad it’s working again!