I have a git repo I am trying to use this command on a remote.

$ git push origin master
ssh: connect to host  port 22: Bad file number
fatal: The remote end hung up unexpectedly.

I am trying to do this with GitBash.

I generally login with ssh ONLY through Putty, so I know my key works and is there. What do I need to do to fix this?

link|improve this question

64% accept rate
What does .git/config say about your remote origin? – Handyman5 Jul 7 '11 at 1:11
Not sure why this is happening, but the "host" is a blank space. – DerfK Jul 7 '11 at 1:40
Missing info would be the contents of git remote show origin; we don't now where you're trying to push. – Andrew M. Jul 11 '11 at 3:40
feedback

1 Answer

http://stackoverflow.com/questions/4399106/pushing-to-github-from-work-bad-file-number-error has an accepted answer that suggests that the problem can be caused by trying to push through a proxy. How exactly that works with SSH I'm not sure, but since the answer is accepted I'd expect that the problem there was a proxy, and fixing it or removing it from the equation solved the problem.

link|improve this answer
No proxy, This is totally with a local network. – mike628 Jul 9 '11 at 0:30
I can log into the machine with my Putty and id_sha keys. But I get this:Permission denied (publickey). fatal: The remote end hung up unexpectedly when I try to use git bash. – mike628 Jul 9 '11 at 15:25
Why are you adding information pertinent to your question in a comment to my answer? Edit your question. – womble Jul 9 '11 at 21:41
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.