出现SSL certificate problem: unable to get local issuer certificate while accessing错误时候,

说明你本地账号认证方式异常了需要重新设置认证方式。

方法一:

 可以用以下命令设置临时环境变量GIT_SSL_NO_VERIFY

 Windows下:set GIT_SSL_NO_VERIFY=true git push
 Linux下:env GIT_SSL_NO_VERIFY=true git push

 设置好之后,然后用Git提交,你也可以把GIT_SSL_NO_VERIFY设置成非临时环境变量,这样就不用每次提交都要执行上面的命令了
 提交的时候,会让你重新输入账号密码或者改用证书模式


方法二:

  你也可以在命令行执行以下命令,之后再提交
  git config --global http.sslVerify false

永久记住HTTPS密码

命令:$ git config --global credential.helper store

会在用户主目录的.gitconfig文件中生成下面的配置

[credential]
    helper = store

如果没有--global,则在当前项目下的.git/config文件中添加

 

记住临时密码

默认记住15分钟:git config –global credential.helper cache

自定义设置1小时:git config credential.helper ‘cache –timeout=3600’




 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2021-07-26
  • 2021-05-01
  • 2021-12-02
猜你喜欢
  • 2022-12-23
  • 2021-11-07
  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
  • 2021-06-09
  • 2021-12-03
相关资源
相似解决方案