Resume and bio of the author Couple of articles related to my hobby - robotics
My impressions about immigration to Australia. In Russian only. Recipes for everyday problems solving
Linux-related posts Windows-related posts
Software-related posts A lot of info about hardware
Different tools you might find useful Posts about various web technologies
Everything that doesn't fit the rest of the menu RSS feed for this blog

Tag Cloud



Andrey Mikhalchuk’s Blog

Technoblog about life

Mar 2, 2013 GIT: ! [remote rejected] master -> master (n/a (unpacker error))

I’m working on multiple machines under multiple accounts on the same project and using git to sync between the codebases. The program by its nature has to run under root account, so no wonder at some point permissions got screwed up and I’ve got stuck with this error:

! [remote rejected] master -> master (n/a (unpacker error))

The solution is quite simple though requires access to the master repo:

Apparently because of git configuration mishmash in my remote repos I’ve got some files checked in as root and naturally when I tried to update the same files under a different account (git) I wasn’t able to rewrite the files. Get to your git origin and check out the objects directory there. Mine looked like this:

drwxr-xr-x 2 git git 51 Feb 23 23:36 d2
drwxr-xr-x 2 git root 51 Mar 1 15:14 d3
drwxr-xr-x 2 root root 51 Mar 1 22:14 d4
drwxr-xr-x 2 git git 141 Mar 1 15:14 db

Well, all you need to do is

chown -R git /objects

Also do not forget to edit .git/config file in your remote repo and fix that username so the situation won’t repeat in the future.

This post is published in How To, Linux, Other.

No comments

No comments so far

Leave a Reply

You must be logged in to post a comment.

Site Map (c) Andrey Mikhalchuk, 2005-2008