4

Finally decided to move from Subversion to Git, but am having problems with my first project. Did my "git init" and am trying to do a "git add" of my project, but it's failing with:

$ git add .
error: unable to set permission to '.git/objects/6b/6018c1c76dc5ec159d5cb65bab72
fa300d52f6'
error: build.xml: failed to insert into database
error: unable to index file build.xml
fatal: adding files failed

I have full permissions to the directories in question. The only odd thing about it is that it's a drive mounted (and mapped) from a server over CIFS. No problems creating/editing files/permissions with other applications. The host is Windows Vista x64 and I'm running git under Cygwin. Server is Windows 2008.

Any other ideas on what I might be doing wrong?

3

Well, after much experimentation and reading of the git mailing list, it appears that chmod functionality is broken in Windows for CIFS network drives. Apparently git works fine locally, but just won't work across the network in Windows environments.

1
chown yourname:yourname .git -R

The hidden .git directory needs to be overwritten with the correct permissions.

1

Had similar issue. I'm hosting my git repositories on a windows server running cygwin sshd. In my case I found my git repositories are palced over a network location, and I had to edit the windows security settings on net network mapping (my computer -> Network locations -> right click on your network map).

I had to enable full control for Everyone group (which obviously not very ideal) but since we're just a small development team and this is an internal network we think it's an acceptable temporary solution

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.