git no longer falls back to system SSL certificate store in Alpine 3.21
Package Information
- Package name:
git
- Package version:
git-2.47.2-r0
- Alpine version:
3.21.3
- Alpine architecture:
x86_64
Summary
git
no longer falls back to system SSL certificate store in Alpine 3.21 if the http.sslCAInfo
parameter doesn't match the server's certificates. This works in Alpine 3.18 to 3.20.
Steps to reproduce
docker run -it alpine:3.21
apk add git openssl ca-certificates
openssl s_client -showcerts -connect google.com:443 </dev/null | openssl x509 -outform PEM > google.pem
git config --global http.sslCAInfo google.pem
git clone https://gitlab.com/gitlab-org/gitlab-shell.git
In Alpine 3.21, I see:
/ # git clone https://gitlab.com/gitlab-org/gitlab-shell.git
Cloning into 'gitlab-shell'...
fatal: unable to access 'https://gitlab.com/gitlab-org/gitlab-shell.git/': SSL certificate problem: self-signed certificate in certificate chain
With the alpine:3.20
image, this works fine.
As far as I can tell, the main difference between alpine:3.20
and alpine:3.21
in this example is the Git version:
alpine:3.20
/ # apk list git curl libssl3 ca-certificates
ca-certificates-20241121-r1 x86_64 {ca-certificates} (MPL-2.0 AND MIT) [installed]
curl-8.12.1-r0 x86_64 {curl} (curl)
git-2.45.3-r0 x86_64 {git} (GPL-2.0-only) [installed]
libssl3-3.3.3-r0 x86_64 {openssl} (Apache-2.0) [installed]
alpine:3.21
/ # apk list git curl libssl3 ca-certificates
ca-certificates-20241121-r1 x86_64 {ca-certificates} (MPL-2.0 AND MIT) [installed]
curl-8.12.1-r0 x86_64 {curl} (curl)
git-2.47.2-r0 x86_64 {git} (GPL-2.0-only) [installed]
libssl3-3.3.3-r0 x86_64 {openssl} (Apache-2.0) [installed]
I tested ubuntu:devel
, which uses Git v2.48, and it doesn't have this problem.