Connection reset by "IP" port 22 and client_loop: send disconnect: Broken pipe on cloning a repo from bitbucket

Viewed 2553

When I try to clone a repo from bitucket with my WiFi connected I receive two response on my terminal (Ubuntu 20.04.2 LTS x86_64) on alternate clone request :

1st request : Connection reset by "IP" port 22

fatal: Could not read from remote repository.

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

2nd request : client_loop: send disconnect: Broken pipe

fatal: Could not read from remote repository.

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

But When I connect my laptop with my mobile hotspot then cloning starts without any error. Why this kind of strange error happens.

P.S : I am cloning with SSH and I have generated SSH keys already. The IP is not in my block list (hosts.deny)

1 Answers

From the discussion, and considering even a basic test like ssh -o TCPKeepAlive=true -Tv git@bitbucket.org still triggers

Connection reset by "IP" port 22 

The most likely explanation is that the ISP (Internet service provider) differs from:

  • the wired Internet access through Wifi
  • the wireless Internet access through your phone

One ISP could block port 22 while the other would not.
Or your local firewall could be setup to block 22 for one kind of network connection (through wifi) and not for the other one (mobile phone).

Related