fatal: unable to access 'H:\/.config/git/config': Invalid argument [Git on Windows 7]

后端 未结 9 2119
刺人心
刺人心 2021-02-03 23:07

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?<

9条回答
  •  不思量自难忘°
    2021-02-03 23:19

    My situation was that I ran git checkout 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

    1. change SSH keys
    2. restart the computer
    3. find .gitconfig (should be in the root of H:// or whatever drive name you have)
    4. open it with Notepad++ (or other editor) and save as is. If it is empty, then save empty one
    5. then git checkout master started working

    If it happned once again, I would start from step 3 :-)

提交回复
热议问题