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

从VS Code推送文件至GitHub仓库时遇HTTPS重复问题求助

解决Git远程仓库HTTPS重复的问题
  • 先检查当前已配置的远程仓库信息,确认是否已存在错误地址:
    git remote -v
    
  • 如果输出里的origin地址确实是重复的https://https://...,先删除这个错误的远程配置:
    git remote remove origin
    
  • 重新添加正确的远程仓库地址:
    git remote add origin https://github.com/ianecross/apple.git
    
  • 要是执行后仍出现HTTPS重复问题,检查Git全局配置里是否有自动给URL加前缀的规则:
    git config --global --get url."https://".insteadOf
    
    如果返回了异常内容(比如重复的HTTPS前缀),直接删除该配置项:
    git config --global --unset url."https://".insteadOf
    
  • 最后执行推送命令:
    git push -u origin main
    

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.30 09:58:11