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

后端 未结 19 1682
甜味超标
甜味超标 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:14

    I am old to the party but may be this will help some one. Thanks to @paperclip

    In Windows 10:

    Step 1: Go to This PC > Right click Properties

    step 2: Click Advanced System Settings and click Environment Variables

    Step 3: Under System Variables create new variable called HOME and input the value as %USERPROFILE% like below

    Step 4: Important You must restart your PC to take effect

    Step 5: Install Git for Windows now and optional Tortoise Git for windows if you prefer.

    Make a git clone request or try pushing something in to your repo. Magic it will work. All should work fine now.

提交回复
热议问题