This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Trouble with Git 2.1.x pushing to repos over Samba

> From: "Michael Enright" <>
> $ git push origin master
> fatal: '//host/path/to/repo.git/' does not appear to be a git repository
> fatal: Could not read from remote repository.

I've been fighting possibly similar problems with git not working on samba shares, on version 1.7.34 and above.
eg on a mapped drive,

#: john@johndesktop:/cygdrive/l ; git log
fatal: Not a git repository (or any parent up to mount point /cygdrive/l)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

I've debugged git, and the problem in my case is that whilst I appear to have execute permissions on .git/objects:

#: john@johndesktop:/cygdrive/l ; ls -ld .git/objects/
drwxr-xr-x 1 john Unix_Group+1000 0 Nov 13 14:13 .git/objects/

(albeit, Corinna, with my group issue still not yet resolved)

the unistd.h function 'access' in git/setup.c claims I don't have the required execute permissions for .git/objects.  Testing it:

#: john@johndesktop:/cygdrive/l/tasks/cygwin_samba_uid_gid_handling ; cat test_access.c 
#include <unistd.h>
#include <stdio.h>

int main()
    char* path = "/cygdrive/l/.git";
    printf("access(%s, R_OK) returned %d\n", path, access(path, R_OK));
    printf("access(%s, W_OK) returned %d\n", path, access(path, W_OK));
    printf("access(%s, X_OK) returned %d\n", path, access(path, X_OK));

#: john@johndesktop:/cygdrive/l/tasks/cygwin_samba_uid_gid_handling ; gcc test_access.c 
#: john@johndesktop:/cygdrive/l/tasks/cygwin_samba_uid_gid_handling ; a.exe
access(/cygdrive/l/.git, R_OK) returned 0
access(/cygdrive/l/.git, W_OK) returned 0
access(/cygdrive/l/.git, X_OK) returned -1

The last test is the one run by git, that makes it reject my /cygdrive/l/.git directory.

Not sure if that's relevant, but just in case.


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]