gitlabber icon indicating copy to clipboard operation
gitlabber copied to clipboard

Self signed certificate support

Open g0ddest opened this issue 2 years ago • 3 comments

It will be nice to have an opportunity to pin own CA certificate or skip certificate error that is happen when trying to use with gitlab with self-signed SSL certificate: requests.exceptions.SSLError: HTTPSConnectionPool(host='gitlab.example.com', port=443): Max retries exceeded with url: /api/v4/groups (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')))

g0ddest avatar Jan 19 '23 12:01 g0ddest

Hi I have same issue as @g0ddest I agree, it could be nice to bypass ssl certificate verify Do you have an advice to ignore this ? (which code to edit ?) Thx

guadaduche avatar Jan 19 '23 14:01 guadaduche

I'm in the same boat, really would appreciate a flag to ignore SSL validation issues.

s00ner avatar Oct 24 '23 16:10 s00ner

You can already use a self signed certificate by setting the OS environment variable REQUESTS_CA_BUNDLE to the path of your self signed cert, which is used inside the get_ca_path() function of script gitlab_tree.py

For example, on Ubuntu I ran: REQUESTS_CA_BUNDLE=/etc/ssl/certs/some.website.com.pem /home/user/.local/bin/gitlabber -t gItLabperSoNalTokeN -p -u https://some.website.com which still complains about SSL but works.

Or if you don't have the certificate installed... you can always change True to False on your local install here and the problem magically goes away.

JosephBowkett avatar Oct 27 '23 21:10 JosephBowkett