Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

access to repository via ssh fails but https work

Recently, I am not able to access repository via SSH-key (it was working one month ago). When I run push/pull, I receive (after around one minute):

 

Connection to bitbucket.org closed by remote host.
fatal: Could not read from remote repository.

When I change it to HTTPS (git remote set-url origin ...) then it works.

I was thinking that it might be a temporary issue, but I had this problem in previous week in one repository, and now, SSH fails in another repository, so I thing something is wrong.

Best regards,
Andrzej

 

1 answer

1 accepted

0 votes
Answer accepted

I remember that Bitbucket had SSH issues a month or so but was resolved after a while. However, this might be also a network issue on your end. Are you on a corporate network or home network? I'm asking because I experienced this problem before and what I did was to use VPN. Not ideal but it worked.

 

Also, have you tried restarting your machine?

I'm using home network, but with my company's VPN turned on it also doesn't work.
Restarting doesn't help.

When I run ssh -v git@bitbucket.org then I receive

OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017 
(...)
debug1: Connecting to bitbucket.org [104.192.141.1] port 22.
debug1: Connection established.
(...)
debug1: Server host key: ssh-rsa SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A
debug1: Host 'bitbucket.org' is known and matches the RSA host key.
debug1: Found key in /home/andrzej/.ssh/known_hosts:62
(...)
debug1: Next authentication method: publickey
debug1: Offering public key: RSA (...)
debug1: Server accepts key: pkalg ssh-rsa blen 535
debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([104.192.141.1]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
(...)
debug1: Sending env LC_TIME = pl_PL.UTF-8

(now it stops for a few seconds)
and then it fail with the following message

debug1: channel 0: free: client-session, nchannels 1 
Connection to bitbucket.org closed by remote host.
Connection to bitbucket.org closed.
Transferred: sent 4236, received 1848 bytes, in 20.1 seconds
Bytes per second: sent 210.5, received 91.8
debug1: Exit status -1

The problem is indeed in my network. I encounter the same problem when logging via ssh to some other remote machine. When I connect to another network (e.g. through mobile connection) it works.

Like Jack likes this

Awesome. Well, not awesome that this problem exists but at least we have a successful workaround. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Bitbucket

How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features on how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your t...

136 views 0 2
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you