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

执行git update-git-for-windows命令报错curl: (43)参数错误

解决Git for Windows更新时的curl参数错误问题

问题场景

执行命令 git update-git-for-windows 时触发以下错误:

git update-git-for-windows
Git for Windows 2.45.2.windows.1 (64-bit)
Update 2.47.0.windows.2 is available
curl: (43) A libcurl function was given a bad argument

已尝试以管理员身份运行命令提示符,问题未解决。

可行解决方案

1. 手动覆盖更新

直接跳过内置更新工具,下载对应版本的Git for Windows安装包,运行安装程序覆盖现有版本即可完成更新。

2. 重置Git的curl相关配置

执行以下命令清除可能冲突的代理或SSL配置:

git config --global --unset-all http.proxy
git config --global --unset-all https.proxy
git config --global http.sslBackend schannel

执行完成后重新运行 git update-git-for-windows 尝试更新。

3. 清理系统PATH中的冲突curl路径

打开系统环境变量设置,检查PATH条目,移除非Git自带的curl路径(避免其他版本curl干扰Git内置工具),重启命令提示符后再次执行更新命令。

内容的提问来源于stack exchange,提问作者Varun V Gowda

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.16 08:29:53