2

I am having an issue on newly created Ubuntu 16.04 OS with bitbucket. When I am cloning repo from bitbucket repository I am getting below error

Cloning into 'my-demos'... fatal: unable to access 'https://amepani@bitbucket.org/amepani/my-demos.git/': gnutls_handshake() failed: Error in the pull function.

I have gone through this link but not able to resolve an issue. I have updated JDK version and also installed the latest version of git but getting the same error.

Let me know how to resolve this issue.

Community
  • 1
  • 1
anomepani
  • 1,796
  • 2
  • 25
  • 34
  • 1
    Hi I have faces this issue due to firewall in which bitbucket.org and other sites blocked and observed this issue when user face slow internet connection. First, Make sure bitbucket.org accessible – anomepani Jul 30 '18 at 10:06
  • I am having the same issue. I am facing slow internet connection issue. – Abdulmoiz Ahmer May 14 '20 at 17:41
  • If bitbucket is restricted by VPN and firewall in your organization then there is more chance to see the above error. – anomepani May 16 '20 at 08:34
  • It was the slow internet connection problem for me. It started working own it's own once the internet speed got little better. – Abdulmoiz Ahmer May 18 '20 at 06:05

3 Answers3

4

Bitbucket uses TLS.

If you are running behind a proxy, try to set your https_proxy.

export https_proxy="http://username:password@yourproxy.com:yourproxyport/"
Nathan Tuggy
  • 2,237
  • 27
  • 30
  • 38
0

I found that a shell script written by Paul Backer resolved this issue for me. The script recompiles git to use openssl instead of gnutls and after that was done I was able to push to Bitbucket again.

The script is available in his repository https://github.com/paul-nelson-baker/git-openssl-shellscript. Read the README for the whole story but it worked for me so thank you Paul.

glaucon
  • 8,112
  • 9
  • 41
  • 63
0

You need to lower your MTU.

ifconfig <Interface_name> mtu <mtu_size> up

In my case, 1400 worked well.

ifconfig ens3 mtu 1400 up

My environment is Ubuntu 20.04.

panoet
  • 3,608
  • 1
  • 16
  • 27