I'm dealing with an Enterprise GitHub server with an expired certificate, and I would like to use the GitHub CLI tools.
gh auth login
responds with:
error validating token: Get "https://github.XXXXXX.com/api/v3/": x509: certificate has expired or is not yet valid: current time 2022-01-04T16:06:33-08:00 is after 2018-06-01T13:55:08Z
I'd like to do sometihing like
git config http.sslVerify false
Is there a way to do this in gh?
This is followed by cli/cli issue 1735 (for a similar case), which clearly states:
We won't be adding an option to skip certificate verification because that would be insecure and would defeat the point of SSL and certificates being enforced in the first place.
So, no, it is not possible to skip SSL check with gh.
You would need to add a proxy (like caddy) in front of that server, which would in turn proxy-pass the query, while ignoring the expired certificate, to the actual GitHub server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With