Git warning: unable to access 'P:\/.gitconfig': Invalid argument

I experienced a similar issue when not connected to my work network via VPN. Deleting the all the HOME% variables did not work. Deleting the network drive it was trying to access did work. Running the following from a command window worked for me:

net use H: /delete

As a note, I did delete the HOME% variables, but it did work until the command above was run.


I just encountered this error.
Executing set HOMEPATH in the command line gave this output:

HOMEPATH=\

Simply deleting this environment variable via set HOMEPATH= fixed the problem.


If you are using "Git Bash" (MINGW64) on Windows:

Enter:

export HOME=/c

To verify:

echo $HOME

Tags:

Git

Git Config