You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行git push -u origin main时遇http.sslverify配置错误,GitHub上传失败

解决Git推送时的"fatal: bad boolean config value 'true~' for 'http.sslverify'"错误

这个错误是因为Git的http.sslverify配置项被设置了无效的布尔值true~(多了个波浪线),导致Git无法解析配置。按以下步骤修复:

  • 先检查全局Git配置中的该值:

    git config --global --get http.sslverify
    

    如果输出是true~,执行以下命令修正全局配置:

    git config --global http.sslverify true
    
  • 若全局配置没问题,进入你的项目仓库目录,检查本地仓库配置:

    git config --local --get http.sslverify
    

    如果输出是true~,执行命令修正本地配置:

    git config --local http.sslverify true
    
  • 也可以直接编辑配置文件:

    • 全局配置文件:Linux/macOS路径为~/.gitconfig,Windows路径为C:\Users\<你的用户名>\.gitconfig,找到[http]段下的sslverify = true~,改成sslverify = true
    • 本地仓库配置文件:项目根目录下的.git/config,同样修改对应行

修复后再执行git push -u origin main即可正常推送代码到GitHub。

内容的提问来源于stack exchange,提问作者user19514686

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.22 08:17:34