Git push to samba/cifs share fails
I get an error message when I try to push my git repository to a share mounted with mount.cifs.
[emanuel@faseri01 frog]$ sudo mount.cifs //windows2003/emanuel /mnt/e -o user=emanuel,uid=500 Password:
[emanuel@faseri01 frog]$ mkdir /mnt/e/frog.git
[emanuel@faseri01 frog]$ git init --bare /mnt/e/frog.git
Initialized empty Git repository in /mnt/e/frog.git/
[emanuel@faseri01 frog]$ git push /mnt/e/frog.git/ master
Counting objects: 18, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (16/16), done.
fatal: error when closing sha1 file: Bad file descriptor
error: pack-objects died of signal 13
error: failed to push some refs to '/mnt/e/frog.git/'
[emanuel@faseri01 frog]$ du -hs
67M .
[emanuel@faseri01 frog]$ uname -a
Linux faseri01 3.3.0-4.fc16.x86_64 #1 SMP Tue Mar 20 18:05:40 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux [emanuel@faseri01 frog]$ git --version
git version 1.7.7.6
This repository is 67M. I do not have any git hooks configured. Another, smaller repository works without errors if I follow the same procedure. The client is a fully up to date Fedora 16 machine. The server is a windows 2003 server.
Is this kind of usage possible with git? I just want to back up my repository to the fileserver.
Thank you for your time.
Kind Regards,
Emanuel Rietveld
Quoted 2 lines · Emanuel Rietveld
I get an error message when I try to push my git repository to a share mounted with mount.cifs.
Hmm, I wonder if this is related to msysgit's "Cannot fetch to mapped network drives (Samba)" issue here:
http://code.google.com/p/msysgit/issues/detail?id=130
Please note that the msysgit issue tracker is closed, so you should not place any comments there. Post to the msysgit mailing list instead.
Signature · 1 line
Sebastian Schuberth
Quoted 5 lines · Sebastian Schuberth
Quoted 2 lines · Emanuel Rietveld
I get an error message when I try to push my git repository to a share mounted with mount.cifs.
Quoted 8 lines
Hmm, I wonder if this is related to msysgit's "Cannot fetch to mapped network drives (Samba)" issue here:
http://code.google.com/p/msysgit/issues/detail?id=130
Please note that the msysgit issue tracker is closed, so you should not place any comments there. Post to the msysgit mailing list instead.
Thank you for the link.
I am not using msysgit. My client is Fedora Linux 16 using git version 1.7.7.6. What excuse can I use to post to the msysgit mailing list for this non-msys git problem?
I tried a git fetch as mentioned in the ticket and it fails with the below error message (same as git clone/git push).
[emanuel@f16machine /mnt/win2003share/frog.git]$ git fetch ~/proj/frog/
remote: Counting objects: 18, done.
remote: Compressing objects: 100% (16/16), done.
fatal: error when closing sha1 file: Bad file descriptor
I tried the suggestion in comment #14, which links to http://marc.info/?l=git&m=123797834905157&w=2 That is a very interesting email thread, but the suggestions do not solve the problem.
Doing git config core.fsyncobjectfiles = true on both source and destination git repositories makes no difference. Same error.
My cifs server OS is not samba on Linux, but a windows 2003 server.
A comment in the linked ticket claims that he only has problems on linux samba shares, not on windows shares. The ticket says it was eventually fixed on the server side. Is windows 2003 broken? Do I need to upgrade to windows 2008 to use git over cifs shares?
Thanks for your time.
Kind Regards,
Emanuel Rietveld
Quoted 3 lines · Emanuel Rietveld
I am not using msysgit. My client is Fedora Linux 16 using git version 1.7.7.6. What excuse can I use to post to the msysgit mailing list for this non-msys git problem?
Well, I was thinking that if there's a problem with a Linux server and Windows client, a similar issue might exist when using a Windows server and Linux client. You could just ask on the msysgit mailing list whether someone has problems using Windows shares exported by a Windows Server 2003 installation.
Quoted 3 lines
samba shares, not on windows shares. The ticket says it was eventually fixed on the server side. Is windows 2003 broken? Do I need to upgrade to windows 2008 to use git over cifs shares?
I have no idea, sorry, other that just trying to use Windows Server 2008 (e.g. in a VM) to see if that solves the problem, and if so, upgrade your installation.
Signature · 1 line
Sebastian Schuberth