sdkman / sdkman-cli

The SDKMAN! Command Line Interface
https://sdkman.io
Apache License 2.0
5.97k stars 629 forks source link

Bug: [SDKMAN does not work with curl 7.81.0] #1224

Closed fcarbon closed 10 months ago

fcarbon commented 11 months ago

Bug report I cannot update or install SDKMAN since I've updated curl to version 7.81.0. When I run: curl -s "https://get.sdkman.io" | bash Nothing gets installed. If I run: curl -sv "https://get.sdkman.io" | bash I get the following error:

It seems that curl cannot find a matching hostname 'get.sdkman.io' on the certificate.

To reproduce

Run: curl -sv "https://get.sdkman.io" | bash

This will display the following output:

$ curl -sv "https://get.sdkman.io" | bash

System info

marc0der commented 11 months ago

Hi @fcarbon, I'd suggest upgrading to the latest version of curl. My local version is 8.1.2, so you seem quite far behind. FWIW, everything works perfectly on my machine and on our CI pipeline. The SSL certificate is also completely up to date and only expires in April 2024. I hope this helps!

JanBessai commented 10 months ago

Recently shipped Debian 12 (bookworm) comes with that version of curl: https://packages.debian.org/bookworm/curl

I have the same issues in a debian:12 based docker container. I'd appreciate if it could be fixed without jumping through too many hoops.

marc0der commented 10 months ago

@JanBessai Oddly, I do not see any such behaviour with Debian 12. Here are the step I took to replicate your issue:

$ docker run --rm -it debian:12 /bin/bash
$ apt update && apt install -y curl zip unzip
$ curl -s https://get.sdkman.io | bash
$ source /root/.sdkman/bin/sdkman-init.sh
$ sdk version
SDKMAN!
script: 5.18.2
native: 0.4.2
$ curl --version
curl 7.88.1 (x86_64-pc-linux-gnu) libcurl/7.88.1 OpenSSL/3.0.9 zlib/1.2.13 brotli/1.0.9 zstd/1.5.4 libidn2/2.3.3 libpsl/0.21.2 (+libidn2/2.3.3) libssh2/1.10.0 nghttp2/1.52.0 librtmp/2.3
Release-Date: 2023-02-20
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

Everything works as expected.

JanBessai commented 10 months ago

I tried to reproduce and found that some snake oil security software I am required to use on the host (FortiClient) is messing with ssl certificates (even inside containers). Sorry to bother you.

marc0der commented 10 months ago

Closing this issue as I see no bug here.