【问题标题】:Git push gives Error reading command streamGit push 给出错误读取命令流
【发布时间】:2013-10-04 18:34:44
【问题描述】:

我正在尝试将我的项目推送到 github 存储库。在我的新项目中,我执行了以下命令:

git init
git commit -m "first commit"
git remote add origin https://github.com/myaccount/MyRepoName.git

但是当我尝试像这样推送我的提交时:

git push -u origin master

它给了我以下错误信息:

fatal: Full write to remote helper failed: Invalid argument
Error reading command stream

我在谷歌上没有找到任何关于这个的信息。请帮我解决这个问题。

【问题讨论】:

  • 使用 ssh 读/写 URL 而不是使用只读 https url。它应该像 git@github.com/myaccount/MyRepoName.git。
  • 现在它给了我消息:致命:'git@github.com/myaccount/MyRepoName.git' 似乎不是 git 存储库致命:无法从远程存储库读取。请确保您拥有正确的访问权限并且存储库存在。
  • 抱歉打错了。应该是,git@github.com:username/Repo.git
  • 好的,它看起来解决了这个问题。谢谢:)

标签: git github push


【解决方案1】:

此错误消息来自transport-helper.c,它调用git remote helpers 之一。

有可能,在 GitHub 不得不忍受的 recent DDoS 之后,并非所有 repos 都支持良好的 https 推送,因此建议切换传输协议(使用 ssh git@github.com:username/repo.git,作为 commented by gnuanu) .

但是如果 https 再次适用于您的存储库,您应该在几天后检查。

【讨论】:

  • 是的,正如我在回答 gnuanu 时所说,它对我有用 :) 谢谢!
猜你喜欢
  • 2014-02-01
  • 2021-11-28
  • 1970-01-01
  • 2013-07-29
  • 2017-06-02
  • 1970-01-01
  • 2018-10-06
  • 2014-10-04
  • 2011-10-13
相关资源
最近更新 更多