Hello,
This is the first time I had a problem with certificate. The problem is with git, when I do a git clone.
GIT_TRACE=1 GIT_CURL_VERBOSE=1 git clone -c http.sslCAInfo=/etc/ssl/certs/cachain.pem -v https://gitea/renovate/renovate-config .
04:29:47.261389 git.c:460 trace: built-in: git clone -c http.sslCAInfo=/etc/ssl/certs/cachain.pem -v https://gitea/renovate/renovate-config .
Cloning into '.'...
04:29:47.268459 run-command.c:655 trace: run_command: git remote-https origin https://gitea/renovate/renovate-config
04:29:47.273097 git.c:750 trace: exec: git-remote-https origin https://gitea/renovate/renovate-config
04:29:47.273284 run-command.c:655 trace: run_command: git-remote-https origin https://gitea/renovate/renovate-config
04:29:47.294484 http.c:725 == Info: Couldn't find host gitea in the (nil) file; using defaults
04:29:47.297665 http.c:725 == Info: Trying 192.168.1.100:443...
04:29:47.297868 http.c:725 == Info: Connected to gitea (192.168.1.100) port 443 (#0)
04:29:47.298591 http.c:725 == Info: found 2 certificates in /etc/ssl/certs/cachain.pem
04:29:47.419139 http.c:725 == Info: found 424 certificates in /etc/ssl/certs
04:29:47.419304 http.c:725 == Info: GnuTLS ciphers: NORMAL:-ARCFOUR-128:-CTYPE-ALL:+CTYPE-X509:-VERS-SSL3.0
04:29:47.419467 http.c:725 == Info: ALPN: offers h2,http/1.1
04:29:47.434756 http.c:725 == Info: SSL connection using TLS1.3 / ECDHE_RSA_AES_256_GCM_SHA384
04:29:47.434810 http.c:725 == Info: server cert verify failed: -101
04:29:47.434881 http.c:725 == Info: Closing connection 0
fatal: unable to access 'https://gitea/renovate/renovate-config/': server cert verify failed: -101
::ffff:192.168.1.100:59080 [08/Feb/2025:03:29:47.432] https~ https/<NOSRV> -1/-1/-1/-1/2 0 0 - - PR-- 2/2/0/0/0 0/0 "<BADREQ>" 0/0 TLSv1.3/TLS_AES_256_GCM_SHA384
With curl, no problem:
curl -v https://gitea/renovate/renovate-config --cacert /etc/ssl/certs/cachain.pem
* Trying 192.168.1.100:443...
* Connected to gitea (192.168.1.100) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/certs/cachain.pem
* CApath: /etc/ssl/certs
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server accepted h2
* Server certificate:
* subject: C=FR; ST=France; L=Paris; O=Home; CN=gitea
* start date: May 24 00:18:56 2023 GMT
* expire date: May 21 00:18:56 2025 GMT
* subjectAltName: host "gitea" matched cert's "gitea"
* issuer: C=FR; ST=France; O= Home; CN= Home
* SSL certificate verify ok.
* using HTTP/2
* h2h3 [:method: GET]
* h2h3 [:path: /renovate/renovate-config]
* h2h3 [:scheme: https]
* h2h3 [:authority: gitea]
* h2h3 [user-agent: curl/7.88.1]
* h2h3 [accept: */*]
* Using Stream ID: 1 (easy handle 0x56524906f2d0)
> GET /renovate/renovate-config HTTP/2
> Host: gitea
> user-agent: curl/7.88.1
> accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
< HTTP/2 303
< cache-control: max-age=0, private, must-revalidate, no-transform
< content-type: text/html; charset=utf-8
< location: /user/login
< set-cookie: i_like_gitea=bv2dpf5654; Path=/; HttpOnly; Secure; SameSite=Lax
< set-cookie: redirect_to=%2Frenovate%2Frenovate-config; Path=/; HttpOnly; Secure; SameSite=Lax
< x-frame-options: SAMEORIGIN
< date: Sat, 08 Feb 2025 03:31:37 GMT
< content-length: 38
<
<a href="/user/login">See Other</a>.
* Connection #0 to host gitea left intact
::ffff:192.168.1.100:39478 [08/Feb/2025:03:31:37.164] https~ gitea/gitea 0/0/0/3/3 303 565 - - ---- 3/2/0/0/0 0/0 "GET https://gitea/renovate/renovate-config HTTP/2.0" 0/0 TLSv1.3/TLS_AES_256_GCM_SHA384
If I put http.sslverify=false, no problem
GIT_TRACE=1 GIT_CURL_VERBOSE=1 git clone -c http.sslverify=false -v https://gitea/renovate/renovate-config .
04:46:33.056324 git.c:460 trace: built-in: git clone -c http.sslverify=false -v https://gitea/renovate/renovate-config .
Cloning into '.'...
04:46:33.063731 run-command.c:655 trace: run_command: git remote-https origin https://gitea/renovate/renovate-config
04:46:33.067639 git.c:750 trace: exec: git-remote-https origin https://gitea/renovate/renovate-config
04:46:33.067740 run-command.c:655 trace: run_command: git-remote-https origin https://gitea/renovate/renovate-config
04:46:33.093166 http.c:725 == Info: Couldn't find host gitea in the (nil) file; using defaults
04:46:33.097177 http.c:725 == Info: Trying 192.168.1.100:443...
04:46:33.097404 http.c:725 == Info: Connected to gitea (192.168.1.100) port 443 (#0)
04:46:33.098270 http.c:725 == Info: found 2 certificates in /etc/ssl/certs/cachain.pem
04:46:33.233601 http.c:725 == Info: found 424 certificates in /etc/ssl/certs
04:46:33.234045 http.c:725 == Info: GnuTLS ciphers: NORMAL:-ARCFOUR-128:-CTYPE-ALL:+CTYPE-X509:-VERS-SSL3.0
04:46:33.234135 http.c:725 == Info: ALPN: offers h2,http/1.1
04:46:33.248345 http.c:725 == Info: SSL connection using TLS1.3 / ECDHE_RSA_AES_256_GCM_SHA384
04:46:33.248392 http.c:725 == Info: server certificate verification SKIPPED
04:46:33.248404 http.c:725 == Info: server certificate status verification SKIPPED
04:46:33.248733 http.c:725 == Info: common name: gitea (matched)
04:46:33.248773 http.c:725 == Info: server certificate expiration date OK
04:46:33.248786 http.c:725 == Info: server certificate activation date OK
04:46:33.248814 http.c:725 == Info: certificate public key: RSA
04:46:33.248829 http.c:725 == Info: certificate version: #3
04:46:33.248949 http.c:725 == Info: subject: C=FR,ST=France,L=Paris,O=Home,CN=gitea
04:46:33.249036 http.c:725 == Info: start date: Wed, 24 May 2023 00:18:56 GMT
04:46:33.249073 http.c:725 == Info: expire date: Sat, 21 May 2025 00:18:56 GMT
04:46:33.249167 http.c:725 == Info: issuer: C=FR,ST=France,O=Home,CN=Home
04:46:33.249217 http.c:725 == Info: ALPN: server accepted h2
global
daemon
log stdout format raw local0
maxconn 2000
tune.ssl.default-dh-param 2048
defaults
mode http
log global
retries 3
timeout http-request 5s
timeout connect 5s
timeout server 30s
timeout client 30s
timeout queue 1m
timeout http-keep-alive 10s
timeout check 10s
default-server check init-addr last,libc,none resolvers dockerdns
frontend https
bind :::443 v4v6 ssl crt-list /etc/ssl/private/certslist alpn h2,http/1.1
option forwardfor
log-format "%ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r %[ssl_c_err]/%[ssl_c_ca_err] %sslv/%sslc"
acl gitea hdr(host) gitea
use_backend gitea if gitea
backend gitea
server gitea gitea:3000
Somebody have idea?