I have a problem with my first-time SSH connection. Yes, I've already done your guides, already tried your "Dealing with firewalls and proxies" article and the problem is still occuring. I am using Win7 32bit, Windows Firewall is disabled, haven't any third-party firewalls, ESET Nod32 Antivirus is not blocking any ports, I am not using any proxy (neither local proxy).

Here goes the logs:

  1. Ordinary SSH connection try

    C:\Users\Mariusz>ssh -vvv git@github.com
    OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to github.com [] port 22.
    debug1: connect to address port 22: Not owner
    ssh: connect to host github.com port 22: Bad file number
  2. NCAT connection try

    C:\Users\Mariusz>ncat github.com 22
    Strange connect error from (10013): No error
    10013 = WSAEACCES

    I think that the "smart-http-support" method won't work for me because I haven't created a repo yet.
    I have just done git init locally, and stopped at the git push step, which returns the same error:

    ssh: connect to host github.com port 22: Bad file number
    fatal: The remote end hung up unexpectedly
  3. corkscrew method (first article from your guide)

    While PUTTYing (with pageant in bg), after inputing login - an error is occuring (MessageBox):

    Disconnected: No supported authentication methods available

    And in the terminal this message is printed out:

    Server refused our key

I have generated the key correctly, using ssh-keygen.

I tried not method by editing ~/.ssh/config yet because I had thought that because I haven't pushed anything to my remote repo so I won't be able to clone anything.

The SSH-forwarding method will not work for me, because it "requires access to an external SSH server" and I haven't any at this time.

What else could I do?

  • Note: “your guides” seems to refer to some GitHub documents. I guess this post was initially part of a GitHub support request and was just copy and pasted into SO. Mar 11, 2011 at 9:07

1 Answer 1


You can use the Smart HTTP method. Just follow the second example in the instructions and use push instead of clone. For instance:

git push https://mariusz@github.com/mariusz/project.git

It works for all git commands that involve remote repositories.

  • Yes, it looks like the asker has some network issues with SSH; HTTP-based access is probably the best idea. @Mariusz: With GitHub, “smart HTTP” access is a drop-in replacement for SSH-based access (as long as you have Git 1.6.6 or later on your end). Just use the https://github.com/user/repo.git URL instead of git@github:user/repo.git (e.g. in your remote configuration). Mar 11, 2011 at 9:12
  • can this technique be made to work for github gists too?
    – Mark Heath
    Jun 21, 2011 at 9:09
  • @Mark: It appears GitHub doesn't support HTTP for Gist at all. I couldn't even clone a Gist repository over it.
    – Patches
    Jun 23, 2011 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy