Error in trying to push remote repository

Hello! I'm currently working on Ruby on Rails Tutorial by Michael Hartl and every time I try to push remote repository I get the error...

    ssh: connect to host bitbucket.org port 22: Connection refused
    fatal: Could not read from remote repository.

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

 

I tried resetting my SSH key but nothing seems to be working. Can anybody help me solve this problem? Thanks in advance! 

3 answers

0 vote
Boris Berenberg Community Champion Jun 10, 2015

Sounds like your SSH connection is not set up correctly. Take a look at this answer detailing exactly how to fix it: http://stackoverflow.com/questions/16074832/cannot-push-to-git-repository-on-bitbucket

I don't think its the SSH connection because previously it worked fine. I asked the same question on stackoverflow as well, but some are claiming that its my firewall setting that is causing the problem. I've read the posting that you linked but it didn't really help me solve my problem.. =(.. I'm using cloud 9 program right now to run the application, is there something I can do on here to solve the problem possibly?

0 vote

Hi Yoobin, 

This looks like for some reason you aren't being able to connect on port 22 on Bitbucket. 

I believe the first thing we need to confirm is if you are able to connect on this port. What is the return of the comman:

telnet bitbucket.org 22

 

You should be able to connect. 

 

Regards, 

Renato Rudnicki

0 vote
Jesse Yowell Atlassian Team Jun 24, 2015

I should also note that we support SSH using port 443, in case you cannot connect via port 22: https://confluence.atlassian.com/display/BITBUCKET/Use+the+SSH+protocol+with+Bitbucket#UsetheSSHprotocolwithBitbucket-SSHonPort443

A typical git remote (push/fetch) entry would be:

git@altssh.bitbucket.org:443/accountname/reponame/

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Uncategorized

Friday fun: how many celebrates Midsummer holiday or is this a Swedish tradition only?

Any other country that celebrates Midsummer holiday (this friday 22 June)?  

37 views 3 1
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you