gnutls_handshake() failed (The TLS connection was non-properly terminated) while getting Fuchsia?
Asked Answered
L

4

9

I was trying to get the Google Fuchsia source code, but I keep running into a bunch of these errors:

ERROR: 'git fetch -p origin' failed:
stdout:
stderr:
fatal: unable to access 'https://fuchsia.googlesource.com/third_party/github.com/google/cppdap/':
gnutls_handshake() failed: The TLS connection was non-properly terminated.
command fail error: exit status 128

As a result, the download never fully finishes, and I have an incomplete clone of the Fuchsia repo.

I know that my Git installation is fine because I can access GitHub repos over https just fine (I do it regularly).

I'm on WSL2 (Ubuntu 20.04 LTS).

How can I fix this error?

Ln answered 16/8, 2021 at 10:32 Comment(0)
M
16

I disable the sslVerify in Ubuntu. And try to clone git. It works.

git config --global http.sslVerify false
Mugwump answered 17/4, 2022 at 2:17 Comment(0)
R
2

In my case the issue was the incorrect value of https proxy variable. The https proxy variable(https_proxy) was using https, where it should have used http.

# WRONG:
https_proxy=https://<proxy-url>

# CORRECT
https_proxy=http://<proxy-url>
Roughandready answered 1/8, 2023 at 16:25 Comment(0)
T
1

In case you still got this error , first of all I suggest to verify the current valid url from the docs

curl -s "https://fuchsia.googlesource.com/fuchsia/+/HEAD/scripts/bootstrap?format=TEXT" | base64 --decode | bash

Then try to force ipv4 with --ipv4 or update curl as described in this answer

apt-get update
apt-get install curl
Talkington answered 2/10, 2021 at 17:57 Comment(1)
installing curl helped (on Raspberry pi, which is Debian nowadays)Wakayama
E
0

I just exit wsl2 and restart it, then solve the problem.

Encumbrancer answered 19/2 at 9:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.