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

执行git push命令报错“fatal: protocol 'git@https' is not supported”求助

解决Git推送错误:fatal: protocol 'git@https' is not supported
  • 先检查当前远程仓库URL,确认格式问题:

    git remote -v
    

    你会看到类似git@https://xxx.git的错误格式,这是把SSH和HTTPS协议混写导致的核心问题。

  • 修正远程仓库URL,根据你常用的协议二选一:

    • 若使用HTTPS协议,执行:
      git remote set-url origin https://[你的仓库完整地址].git
      
      示例:git remote set-url origin https://github.com/yourname/your-repo.git
    • 若使用SSH协议,执行:
      git remote set-url origin git@[你的仓库完整地址].git
      
      示例:git remote set-url origin git@github.com:yourname/your-repo.git
  • 重新执行推送命令:

    git push -u origin master
    

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.24 20:33:09