Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
推送到github失败_Git_Github_Gist - Fatal编程技术网

推送到github失败

推送到github失败,git,github,gist,Git,Github,Gist,试图将PNG推送到我的github gist,但没有成功 $ 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 comp

试图将PNG推送到我的github gist,但没有成功

$ 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

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

要通过SSH克隆gist-

git clone git@github.com:6124716.git

似乎是你的问题?是和否。我以前曾将PNG文件推送到gist,所以我知道这是可能的,但不确定链接答案中报告的缺少支持。不管怎样,@donatello的解决方案对我来说很有效。啊,缺少对API的支持。嗯。工作。谢谢有人知道那里发生了什么吗?截至2017年11月,这仍然是一个问题:无法使用HTTP推送,切换到SSH,它可以工作!