error: insufficient permission for adding an object to repository database .git/objects #14

Closed
opened 3 years ago by s · 3 comments
s commented 3 years ago

Everything was working fine for me to push to the git but now suddenly I get the following error: "insufficient permission for adding an object to repository database .git/objects".

It feels like it emerged after changing a URL in the image gallery, but I'm not sure tbh. Any clue?

Everything was working fine for me to push to the git but now suddenly I get the following error: "insufficient permission for adding an object to repository database .git/objects". It feels like it emerged after changing a URL in the image gallery, but I'm not sure tbh. Any clue?

hi! hmm I am not sure what it could be.. did you manage to edit/ upload everything you want/ need for tomorrow though?

hi! hmm I am not sure what it could be.. did you manage to edit/ upload everything you want/ need for tomorrow though?
s commented 3 years ago
Poster

Luckily I was able to do most of the changes before this error occurred. If it can be solved before the event, I'm going to simply upload the file directly to the narrowcast directory.

Luckily I was able to do most of the changes before this error occurred. If it can be solved before the event, I'm going to simply upload the file directly to the narrowcast directory.
Owner

This kind of error normally happens when a user who is not gitea runs the hooks on the server. Then the clone/hook/file permissions get changed and the gitea user can't access the files anymore. I ran:

$ chown -R gitea:gitea /srv/gitea/gitea-repositories/varia/web-narrowcast.git/
$ chown -R gitea:gitea /srv/gitea/clones/web-narrowcast/

To reset the permissions and then to test:

$ sudo -su gitea /srv/gitea/gitea-repositories/varia/web-narrowcast.git/hooks/post-update

Seems to work now!

This kind of error normally happens when a user who is not gitea runs the hooks on the server. Then the clone/hook/file permissions get changed and the gitea user can't access the files anymore. I ran: ``` $ chown -R gitea:gitea /srv/gitea/gitea-repositories/varia/web-narrowcast.git/ $ chown -R gitea:gitea /srv/gitea/clones/web-narrowcast/ ``` To reset the permissions and then to test: ``` $ sudo -su gitea /srv/gitea/gitea-repositories/varia/web-narrowcast.git/hooks/post-update ``` Seems to work now!
s closed this issue 3 years ago
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.