1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues

Issues

Issue #5731 invalid

Bad file number error during ssh attempt to bitbucket

Kim Alvin Lambiguit
created an issue

i made a comment on issue #3077 but i think it's closed so i'm making another one. the same general error ( ssh access )but different actual error (bad file number ) below is the command executed during clone

$ git clone git@bitbucket.org:easterneurotours/travelwho.git
Cloning into 'travelwho'...
ssh: connect to host bitbucket.org port 22: Bad file number
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

and below is the test ssh command suggested in issue #3077

$ ssh -i ~/.ssh/id_rsa -vvv git@bitbucket.org
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /c/Users/kimlambiguit/.ssh/config
debug1: Applying options for bitbucket.org
debug2: ssh_connect: needpriv 0
debug1: Connecting to bitbucket.org [207.223.240.181] port 22.
debug1: connect to address 207.223.240.181 port 22: Attempt to connect timed out
debug1: Connecting to bitbucket.org [207.223.240.182] port 22.
debug1: connect to address 207.223.240.182 port 22: Attempt to connect timed out
ssh: connect to host bitbucket.org port 22: Bad file number

the public key is added to my account and my firewall is off.

Thanks!

Comments (12)

  1. Nicolas Venegas

    If you are still having this problem, can you please email support@bitbucket.org (and state this issue number).

    When emailing, please provide the output of ssh -T git@bitbucket.org, e.g.,

    $ ssh -T git@bitbucket.org
    conq: logged in as nvenegas.
    
    You can use git or hg to connect to Bitbucket. Shell access is disabled.
    

    Stack Overflow has a thread that may help you, too: http://stackoverflow.com/questions/7144811/git-ssh-error-connect-to-host-bad-file-number

  2. Adrian Ionita

    On Windows, for working behind a corporate proxy

    Create .ssh/config file under the home folder with the following content :

    Host bitbucket.org
    ProxyCommand connect -S <proxy_host>:<proxy_socks_port> %h %p
    
  3. Log in to comment