Trouble setting up git with my GitHub Account error: could not lock config file

后端 未结 19 1659
甜味超标
甜味超标 2020-11-28 05:52

I\'m getting this error when trying to set the global config:

$ git config --global user.name \"Your Name Here\"
error: could not lock config file /pathto/fi         


        
19条回答
  •  臣服心动
    2020-11-28 06:08

    Windows Users: Ensure your Environment Variables are correctly setup.

    I had the following for my account username 'paperclip':

    My Computer (right-click) > Properties > Advanced (tab) > Environment Variables (under System Variables):

    HOME -> %HOMEPATH%

    HOMEPATH -> C:\Documents and Settings\paperclip

    It seems like Git could not resolve / expand %HOME% to %HOMEPATH% as you would it expect it to. Instead I needed to make %HOME% the same as %HOMEPATH% by changing it to:

    HOME -> C:\Documents and Settings\paperclip

提交回复
热议问题