2

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)

Jayant Sharma
  • 87
  • 1
  • 7
  • Anything in `/var/log/auth.log`? – VonC Apr 03 '21 at 19:42
  • When I make a request, I didn't get anything in /var/log/auth.log @VonC – Jayant Sharma Apr 03 '21 at 20:16
  • What "request"/exact command are you typing? What is your version of Git? – VonC Apr 03 '21 at 20:30
  • I am using git version 2.25.1 And I am copying the command from bitbucket SSH cloning command of a repo i.e git clone git@bitbucket.org:"repo path/link" I hope you got my point. @VonC – Jayant Sharma Apr 03 '21 at 21:09
  • Looks Good. Any chance you could upgrade Git first to 2.31.1 using ppa? (http://lifeonubuntu.com/upgrading-ubuntu-to-use-the-latest-git-version/) – VonC Apr 03 '21 at 21:10
  • No, I don't think I need to upgrade Git using ppa because I can able to clone using HTTPS but not able to clone SSH from the same bitbucket account . – Jayant Sharma Apr 03 '21 at 21:15
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/230710/discussion-between-jayant-sharma-and-vonc). – Jayant Sharma Apr 03 '21 at 21:16

1 Answers1

0

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).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • My ISP is not blocking port 22. Now, I am unable to clone from my mobile hotspot. New error : **"error: RPC failed; curl 35 gnutls_handshake() failed: Error in the pull function fatal: the remote end hung up unexpectedly "** @VonC – Jayant Sharma Apr 05 '21 at 13:29
  • @JayantSharma Did it work before (with mobile hotspot)? – VonC Apr 05 '21 at 15:12
  • @JayantSharma Is your Linux running as a Virtual Server? (https://serverfault.com/a/892887/783) Or is it a TLS version issue? (https://stackoverflow.com/q/38375211/6309) (https://github.blog/2018-02-01-crypto-removal-notice/) – VonC Apr 05 '21 at 15:13
  • No, my linux is not running as a virtual server. I don't know why this error occured. Response have different errors on each reques: 1.Broken Pipe 2. Connection reset "IP" by port 22 3. gnutls_handshake() failed: Error in the pull function. – Jayant Sharma Apr 05 '21 at 18:04