git 从工作“错误文件号”错误推送到 github

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4399106/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 04:49:03  来源:igfitidea点击:

pushing to github from work "Bad file number" error

gitgithubmsysgit

提问by Monomachus

I got msysgit installed at my computer. And I configured it to work with github at home, where everything went fine. At work it doesn't:

我在我的电脑上安装了 msysgit。我将它配置为在家中与 github 一起使用,一切都很顺利。在工作中它不会:

D:\rails_tutorial_projects\first_app>git push --verbose
Pushing to [email protected]:Monomachus/DemoRubyApp.git
ssh: connect to host github.com port 22: Bad file number
fatal: The remote end hung up unexpectedly

I read about Smart HTTP Support https://github.com/blog/642-smart-http-support
But it seems that it doesn't work too. I make clone and all that stuff without problems but when I try to push changes back to github this is where the same problems came in.
My msysgit version is git version 1.7.3.1.msysgit.0

我读了关于智能 HTTP 支持https://github.com/blog/642-smart-http-support
但它似乎也不起作用。我克隆和所有这些东西都没有问题,但是当我尝试将更改推回 github 时,这就是出现相同问题的地方。
我的 msysgit 版本是 git 版本 1.7.3.1.msysgit.0

Please help me with this awkward situation.

请帮我解决这个尴尬的情况。

回答by nchpmn

This error is also caused by attempting to push/clone etc. through a proxy server. Since you mentioned you are at a business, do they use a proxy server there?

尝试通过代理服务器进行推送/克隆等操作也会导致此错误。既然你提到你在做生意,他们在那里使用代理服务器吗?

The error is git literally saying, "hey, the file isn't there", because it can't get through the proxy server.

错误是 git 字面上的意思,“嘿,文件不存在”,因为它无法通过代理服务器。