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

Git克隆报错:Could not resolve proxy 问题求助(附已尝试操作)

解决Git克隆时"Could not resolve proxy: proxy"错误
  • 先清理全局的HTTPS代理配置,你当前全局配置里的空https.proxy条目可能是问题根源:

    git config --global --unset https.proxy
    
  • 若已初始化本地仓库,检查并清理本地仓库的代理配置:

    git config --local --unset http.proxy
    git config --local --unset https.proxy
    
  • 再检查系统级Git配置,需用sudo权限执行:

    sudo git config --system --unset http.proxy
    sudo git config --system --unset https.proxy
    
  • 验证代理配置是否完全清理:

    git config -l --show-origin
    

    确保输出里没有任何http.proxy或https.proxy相关条目。

  • 若仍报错,检查系统环境变量中的代理设置:

    echo $HTTP_PROXY
    echo $HTTPS_PROXY
    

    如果输出有值,临时取消可执行:

    unset HTTP_PROXY
    unset HTTPS_PROXY
    

    永久取消的话,编辑你的shell配置文件(如~/.bashrc或~/.zshrc),删除设置HTTP_PROXY和HTTPS_PROXY的行,再执行source ~/.bashrc(对应你的配置文件)使修改生效。

完成以上步骤后再尝试克隆仓库即可。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.14 07:35:23