Cygwin failing to open .git/config

609 views Asked by At

I believe that I am missing something obvious.

I am using Windows 8.1 in VMWare Fusion on a Mac OS X host. I have installed Git as a Windows component, and I also installed Git as a Cygwin component.

I was able to use all my usual Git commands on Cygwin within a versioned directory. However, when I tried to push, I was notified that I have not yet associated my e-mail or name (git config --global user.name <name>; git config --global user.email <email address>).

When I ran those commands, I got a permission denied. Afterward, I was unable to issue ANY git command (status; show; pull; fetch; etc...).

I received the following error in Cygwin:

fatal: permission denied opening .git/config

UPDATE: I seemed to have resolved this by deleting my Cygwin C:\cygwin64\home\<user>\.gitconfig file. Any idea what may have been going on?

I believe that there is an issue when a .gitconfig is in the Cygwin home directory and there's a config file in the actual C:\Users\<user>\.git\ folder.

Am I missing something?

1

There are 1 answers

0
Hectron On

I seemed to have resolved this by deleting my Cygwin C:\cygwin64\home\.gitconfig file.