Can't commit new files through git


#1

Hi,

After attempting a git merge mybranch on my glitch project (fairy-tail-bot), I got the following error:
insufficient permission for adding an object to repository database .git/objects

Checking that directory showed that about half of the contents of .git/objects are owned by root, prohibiting me from adding any new files through git. Is there something I can do to fix this, or possibly have an admin fix it for me? Also, what got me into this mess in the first place so I can avoid it in the future?


#2

Hi @adams164,

I don’t see any file owned by root in your project. Can you describe more exactly the steps you’re taking to do the merge? Are you doing it in the Glitch Console? On your machine? If I remix your project, what are the steps I should make to reproduce your issue?


#3

Hi,
The files owned by root are the directories in .git/objects. I am having this issue on the Glitch Console. To reproduce in a remixed project:

  1. cd .git/objects
  2. ls -l
  3. You should see a large number of the directories owned by root

EDIT:
The steps I’m taking to merge is just running “git merge dev-branch”. It merged in the new files but would not apply the commit. Now, with new files, running git commit will not work, citing the same lack of permissions in .git/objects


#4

We’ll keep investigating to figure out the cause of your issue; for now, I’ve manually changed back the owner of those files to the app user.

Sorry for the inconvenience, and thanks for your report!