git clone fails with: error: chmod on config.lock failed: Invalid argument

Christopher Cobb ccobb@email.com
Thu Jan 28 06:35:00 GMT 2016


Or maybe chmod is broken, like it is on my machine:

$ touch x
$ chmod 777 x
chmod: changing permissions of ‘x’: Invalid argument

> Sent: Wednesday, January 27, 2016 at 9:53 AM
> From: "Corinna Vinschen" <corinna-cygwin@cygwin.com>
> To: cygwin@cygwin.com
> Subject: Re: git clone fails with: error: chmod on config.lock failed: Invalid argument
>
> On Jan 27 08:30, Ken Brown wrote:
> > On 1/27/2016 7:41 AM, Rainer Blome wrote:
> > >Hi!
> > >
> > >When I use "git clone foo bar" on a Linux host, it works as expected.
> > >
> > >  git clone foo bar
> > >  Cloning into 'bar'...
> > >  done.
> > >
> > >When I use the same command on my Cygwin 64 installation, this used
> > >to work, but does not work any more.  I can fetch and otherwise use
> > >Git in existing repos all right (have not noticed anything else
> > >amiss), but the clone command fails like this:
> > >
> > >----
> > >cd /cygdrive/c/base
> > >git clone foo bar
> > >Cloning into 'bar'...
> > >error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument
> > >error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument
> > >error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument
> > >error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument
> > >error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument
> > >fatal: 'origin' does not appear to be a git repository
> > >fatal: Could not read from remote repository.
> > >
> > >Please make sure you have the correct access rights
> > >and the repository exists.
> > >----
> > >
> > >Directory `bar` exists neither before nor after the attempted cloning.
> > >In the parent directory, manually creating a subdirectory works as
> > >expected:
> > >
> > >  /cygdrive/c/base> mkdir bar; ls -ld bar; rmdir bar
> > >  drwx------+ 1 username 123 0 Jan 27 13:13 bar
> > >
> > >The issue is not restricted to local cloning, the same messages are
> > >printed when I attempt to clone from a remote host (from which I
> > >can clone just fine from a Linux client).
> > >
> > >Searching the internet for "cygwin git error chmod on config.lock
> > >failed: Invalid argument" gave not useful results.
> > >
> > >I first noticed the issue after having upgraded to Cygwin 2.4.0-1.
> > >Juding from the directory creation times in `base`,
> > >it looks like the last successful clone happened on 2015-07-28.
> > >I do not know which version of Cygwin I used at that time,
> > >I update roughly once a month.
> > >
> > >Today, I upgraded to 2.4.1-1, the issue persists.
> > >
> > >I tried downgrading git from 2.7 to 2.6 via the installer.
> > >The issue persisted, so I rolled forward again, the issue persisted.
> > >
> > >How can I troubleshoot this further?
> > 
> > There might be a problem with the default ACL on the directory
> > /cygdrive/c/base.  What does 'getfacl /cygdrive/c/base' show?
> 
> Also, what does the native windows icacls command print for that
> directory?  The setup of the ACL may give us a hint why git apparently
> fails to create the bar subdir.
> 
> 
> Thanks,
> Corinna
> 
> -- 
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Maintainer                 cygwin AT cygwin DOT com
> Red Hat
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list