Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

disable SSL verify in GitHub CLI (gh)

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?

like image 969
mike Avatar asked Jan 29 '26 08:01

mike


1 Answers

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.

like image 185
VonC Avatar answered Jan 31 '26 21:01

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!