I have a gitlab community edition hosted on a server, and when using curl on this server to fetch this local gitlab website, I get an expired certificate error even if the dates are valid:
curl --insecure -vvI https://gitlab.mysite.com 2>&1 | awk 'BEGIN { cert=0 } /^\* Server certificate:/ { cert=1 } /^\*/ { if (cert) print }'
* Server certificate:
* subject: CN=gitlab.mysite.com
* start date: Nov 12 14:36:12 2021 GMT
* expire date: Feb 10 14:36:11 2022 GMT
* issuer: C=US; O=Let's Encrypt; CN=R3
* SSL certificate verify result: certificate has expired (10), continuing anyway.
But I don't get this expired certificate error when loading the site from a browser, or when using curl on another server. The error only appears when using curl locally, on the server hosting the gitlab ce instance.
This is the result when using curl on another server:
* Server certificate:
* subject: CN=gitlab.mysite.com
* start date: Nov 12 14:36:12 2021 GMT
* expire date: Feb 10 14:36:11 2022 GMT
* issuer: C=US; O=Let's Encrypt; CN=R3
* SSL certificate verify ok.
Is it possible that there is an issue because the curl is resolving to a local website (resolved ip = 127.0.1.1)?