Symptoms
- Users cannot access the instance.
- Pull requests do not update with new pushes.
- Webhooks are not delivered, and GitHub Actions workflows are not triggered.
/var/log/github/exceptions.logcontainscertificate verify failederrors.
Causes
Every certificate is only valid between its notBefore and notAfter dates. If the certificate for your instance, or any intermediate or root certificate in its chain, has expired, validation fails.
Custom certificate authority (CA) certificates installed on the instance can expire in the same way.
Confirming the problem
-
SSH into the administrative shell. For more information, see Accessing the administrative shell (SSH).
-
Check the validity dates of the certificate the instance is using.
openssl x509 -in /etc/haproxy/ssl.crt -noout -subject -datesIf the
notAfterdate has passed, the certificate has expired. -
If you have installed custom CA certificates, list them.
ghe-ssl-ca-certificate-install -l -
Check the validity dates of each one, replacing CERTIFICATE with a file name from the list.
openssl x509 -in /usr/local/share/ca-certificates/CERTIFICATE -noout -subject -dates
Resolving the problem
Warning
Replacing a certificate starts a configuration run, which restarts services. Enable maintenance mode first to reduce the impact on users. For more information, see Enabling and scheduling maintenance mode.
-
Upload a valid certificate, or enable Let's Encrypt to manage the certificate for you. For more information, see Configuring TLS.
Include the full certificate chain in the file you upload. For more information, see Troubleshooting TLS errors.
-
For each expired custom CA certificate, remove it with
ghe-ssl-ca-certificate-install -rif it is no longer needed. If the instance still needs to trust that CA, install a valid replacement withghe-ssl-ca-certificate-install -cinstead. Then apply the configuration. For more information, see Command-line utilities. -
If you enabled maintenance mode, disable it once the configuration run has finished.
Contacting GitHub Support
If your certificate is in date but you see the symptoms above, an intermediate or root certificate in the chain may have expired. If you cannot confirm this, or the problems continue after you replace the certificate, contact GitHub Support. For more information, see Creating a support ticket.
Do not send your private key to GitHub Support.
If you have already opened a ticket, attaching a support bundle helps GitHub Support diagnose the problem faster. For more information, see Providing data to GitHub Support.