I get this error when opening a git repository:
fatal: unable to access \'H:/.config/git/config\': Invalid argument
Where in git is this path being pulled from?<
Set HOME var in 'User variable for ' (Control Panel\All Control Panel Items\System\ => Advanced system settings\Advanced\Env variables)
It resolved my issue.
Make sure, in a command line window:
HOME
is indeed not set: type set HOME
, which would return its value if anythe issue persists with the latest msysgit distribution (1.9.0): unzip that archive anywhere, and call git with its full path:
c/mydir/PortableGit-1.9.0-preview20140217/bin/git.exe --global -l
net delete is not a must.
First check HOME setting, then change HOME and HOMEDRIVE to a existing dir.
c:\git\selenium-automation>set HOME
HOME=U:\
HOMEDRIVE=U:
HOMEPATH=\
HOMESHARE=\\XX
then change HOME and HOMEDRIVE by
set HOME=c:\tmp
set HOMEDRIVE=C:
c:\git\selenium-automation>set HOME
HOME=c:\tmp
HOMEDRIVE=c:
HOMEPATH=\
HOMESHARE=\\XX
If you'll check your GIT installation path /git/etc/profile you'll see HOME variable set as:
HOME="$HOMEDRIVE$HOMEPATH"
For this I created HOME variable in my Environment variables and it started working.
My situation was that I ran git checkout <branch>
and I had fatal: unable to access 'H://.gitconfig': Invalid argument
. Then I run set HOME
and had no results.
The following steps solved the issue
git checkout master
started workingIf it happned once again, I would start from step 3 :-)
As some people are saying this seems to be an issue with HomeDrive and HomePath when using network drives.
For me this was solved by running my git commands as admin.