Unable to pull/push in git repository

前端 未结 23 2343
执笔经年
执笔经年 2020-12-08 06:15
$ git pull origin master
fatal: unable to access \'https://xxxxxxxxxxxxxxx\': 
      error setting certificate verify locations:
CAfile: C:/Users/abc/AppData/Local/P         


        
23条回答
  •  春和景丽
    2020-12-08 06:52

    I once had the same problem. My problem occured after re-installing git for windows. I'm using git for windows 64-bit on windows 10.

    I found out that the installer did not install git anymore in C:/Users/[USER_NAME]/AppData/Local/Programs/Git. Instead it installed it under C:\Program Files\Git.

    Nevertheless the old config file C:\ProgramData\Git\config was not edited by the installer. This file still contains the old path so I edited it manually.

    E.g. on my system I used

    [http]
         sslCAInfo = C:/Programme/Git/mingw64/ssl/certs/ca-bundle.crt
    

    maybe you will have to use Program Files instead

         sslCAInfo = C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
    

    EDIT

    Like DS said in his comment

    C:\ProgramData\Git\config needs to be edited as Administrator.

    E.g. right click on notepad and select "Run as Administrator" then open the file.

提交回复
热议问题