【问题标题】:Push to github gist failing推送到 github gist 失败
【发布时间】:2013-08-02 13:59:58
【问题描述】:

尝试将 PNG 推送到我的 github 要点但没有成功。

$ git clone https://gist.github.com/6124716.git
$ cd 6124716
$ ls
fed.json     index.html     vermont.json

然后我可以修改 index.html 并将更改推送到我的 github 存储库。但是,一旦我将 png 文件保存到 repo,我就无法推送:

$ git push
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 25.48 KiB, done.
Total 3 (delta 0), reused 0 (delta 0)
error: RPC failed; result=52, HTTP code = 0
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

阅读该问题后,我看到了增加缓冲区大小的建议:

$ git config http.postBuffer 524288000

但我仍然收到相同的错误消息。此外,vermont.json 比我要上传的 PNG 大得多。

$ ls -la
drwxr-xr-x   7 mparrilla  staff     238 Aug  2 09:53 .
drwxr-xr-x   7 mparrilla  staff     238 Aug  2 09:53 ..
drwxr-xr-x  14 mparrilla  staff     476 Aug  2 09:56 .git
-rw-r--r--   1 mparrilla  staff    5635 Aug  2 09:52 fed.json
-rw-r--r--   1 mparrilla  staff    3381 Aug  2 09:52 index.html
-rw-r--r--   1 mparrilla  staff   25776 Aug  2 09:28 thumbnail.png
-rw-r--r--   1 mparrilla  staff  187388 Aug  2 09:52 vermont.json

【问题讨论】:

  • This 好像是你的问题?
  • 是和不是。我之前已经将PNG文件推送到了要点,所以我知道这是可能的,不确定链接答案中报告的缺乏支持。无论如何,@donatello 的解决方案对我有用。
  • 啊,缺少对API的支持。

标签: git github gist


【解决方案1】:

我不确定使用 HTTPS 有什么问题,但作为替代方案,您可以尝试使用 SSH:

通过 SSH 克隆 gist -

git clone git@github.com:6124716.git

【讨论】:

  • 嗯。工作。谢谢。有人知道那里发生了什么吗?
  • 截至 2017 年 11 月,这仍然是一个问题:无法使用 HTTP 推送,——切换到 SSH 并且可以正常工作!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-02-16
  • 1970-01-01
  • 1970-01-01
  • 2019-08-18
  • 2011-02-11
  • 1970-01-01
  • 2021-11-22
相关资源
最近更新 更多