0

On a bare repository, I am getting this error when I try to push the GIT changes from my local repository to the remote repository :

c:\mockema>git push origin master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 331 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
error: insufficient permission for adding an object to repository database ./objects
fatal: failed to write object
error: unpack failed: unpack-objects abnormal exit
To //Apps-raphael/em/MockEMA/mockema.git
 ! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to '//Apps-raphael/em/MockEMA/mockema.git'

However, I logged into the server and went into the remote repository and tried to change(just for testing) the permission using CHMOD as " chmod -R 777 * "

But the permissions still remain as "drwxr-xr-x".

Tried to look around online for some help and most of the solution indicate using chmod to update the permission. It doesnot seem to work for me. I am using chmod incorrectly?

Thanks in anticipation.

nkare
  • 397
  • 6
  • 17
  • 1
    Do you have the owner ship for your directory? Without the ownership, you can not change the permission. What does `ls -ld yourdir` shows? – Yasushi Shoji Aug 14 '12 at 17:20
  • I'm confused by your question, because `//Apps-raphael/em/MockEMA/mockema.git` looks like a Windows filesystem path, but you're referring to Unix commands such as `chmod`. Are you sure you're pushing to where you think you're pushing? – larsks Aug 14 '12 at 17:21
  • 1
    Have you tried this http://stackoverflow.com/questions/7042783/insufficient-permission-pushing-to-git-shared-repo-over-smart-http?rq=1 – madflow Aug 14 '12 at 17:22
  • @yasushiShoji - it shows drwxr-xr-x 10 apps Administ 0 Aug 14 10:36 . and I am logged in using "apps" user – nkare Aug 14 '12 at 17:22
  • @madflow - yes, I have set core.sharedRepository as true – nkare Aug 14 '12 at 17:23
  • @larsks I am using GIT from http://git-scm.com/, which also give a gitbash that acts as a unix shell for windows – nkare Aug 14 '12 at 17:24
  • 1
    @nkare, are you `apps` or are you in the `Administ` group? If not, do you own `MockEMA` dir, or `em` dir? if you have owner ship, you can use `chown` command to change the ownership of dirs. – Yasushi Shoji Aug 14 '12 at 17:31

1 Answers1

0

There are issues with using a bare path. You should use the file protocol to avoid Git trying to make hard links if you are executing it on a Linux box that's accessing the windows box.

To stop Git from trying to help you with hardlinks, use

file:///Apps-raphael/em/MockEMA/mockema.git

or something similar.

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141