I had a problem doing this that took me an hour to debug, so am posting an answer in case anyone else comes here looking.
Actually it is the same cause as Yorkwar's, but different errors.
Everything goes fine until make install
outputs:
$ make install
GEN perl/PM.stamp
SUBDIR gitweb
SUBDIR ../
make[2]: 'GIT-VERSION-FILE' is up to date.
GEN git-instaweb
BUILTIN all
SUBDIR git-gui
SUBDIR gitk-git
SUBDIR perl
SUBDIR templates
install -d -m 755 '/usr/local/bin'
make: execvp: install: Permission denied
Makefile:2342: recipe for target 'install' failed
make: *** [install] Error 127
After a lot of mucking with UAC, setuid, icacls, ownership etc. , I found via strace
that the actual problem is that when executing install
: since I have ./
in my PATH
, and Windows is case-insensitive, it tries to execute INSTALL
, which is a textfile that does not have the x
bit set. So the "Permission denied" refers to the fact that x
is not set on this file.
@Yorkwar fixed this by renaming all the INSTALL
files, however another option is to edit Makefile
and replace
INSTALL = install
with
INSTALL = /usr/bin/install
I'm using cygwin 32-bit in Windows 7 64-bit (installed it before cygwin64 came out and haven't bothered to upgrade). Successfully built and install git version 2.0.0.rc4.dirty
which was the result of git clone https://github.com/git/git.git
.