pawelsikora / mkdocs-with-confluence

MkDocs plugin for uploading markdown documentation to Confluence via Confluence REST API
MIT License
67 stars 33 forks source link

SSL CACERT missing #11

Open eclisia opened 1 year ago

eclisia commented 1 year ago

Dear,

I've got an SSL error message when I try to use your excellent code from a gitlab pipeline. It seems that I need to pass cacert as parameter. Does this feature exist ?

Test done :

Without your library and directly with CURL I can reach my confluence. So I think that my issue root cause is the absence of SSL/CACERT in your example. For instance :

curl  --cacert curl-ca-bundle.crt  --url "https://myconfluence.com/rest/api/content/251548690" -H "Authorization: Bearer fjhs_my_tokenskjd" 

This curl request send my well informations. Whereas, if I suppress the --cacert option, I've got the same SSL error message.

Error message from my gitlab pipeline :

requests.exceptions.SSLError: HTTPSConnectionPool(host='myconfluence.com', port=443): Max retries exceeded with url: /rest/api/content?title=Home&spaceKey=TDF&expand=history (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)')))

A lot of thanks for your support.

Acsigen commented 1 year ago

I had a similar issue with a custom CA. I fixed it by appending my CA certificate to /usr/local/lib/python3.11/site-packages/certifi/cacert.pem