使用git协议时推送到GitHub失败

使用git协议时推送到GitHub失败,git,github,Git,Github,我试图推送到Github,但我得到了以下错误 fatal: remote error You can't push to git://github.com/username/repo.git Use https://github.com/username/repo.git 我在互联网上看到,我必须用http://替换git://但我已经将它设置为正确的地址 这是我的配置: [remote "origin"] url = https://github.com/username/rep

我试图推送到Github,但我得到了以下错误

fatal: remote error
  You can't push to git://github.com/username/repo.git
  Use https://github.com/username/repo.git
我在互联网上看到,我必须用http://替换git://但我已经将它设置为正确的地址

这是我的配置:

[remote "origin"]
  url = https://github.com/username/repo.git
  fetch = +refs/heads/*:refs/remotes/origin/*
有人知道是什么导致了这个问题吗?

查看git hubs帮助

试试这个

  • git远程rm源
  • git远程添加源
  • git@github.com:user/repo.git git推送原始主机

  • 因此,在我的案例中,互联网上建议的解决方案都不起作用。最终对我有效的是完全卸载并重新安装Git

    • 卸载git
    • 手动删除任何遗留文件
    • 重新启动计算机
    • 再次安装git

    重新启动计算机是很重要的一部分,因为当我在没有重新启动的情况下重新安装时,它会出现同样的错误。重新启动似乎可以解决问题。

    此地址错误。在github上设置ssh密钥并使用此地址:
    git@github.com:username/projectname
    很抱歉,我没有看到直播部分。你试过马立克R吗?