Skip to content

Add possibility to use self signed certificate servers #6

@jlahtinen

Description

@jlahtinen

Sometimes (quite often at my workflow) sonarqube server is behind self signed certificate. It would be nice if --ca my_server_cert.pem could be one of the parameters.

Ad-hoc fix I used was

@@ -37,7 +42,7 @@ def create_args() -> argparse.ArgumentParser:
     return args
 
 def _get(url: str, token: str) -> {dict}:
-    resp = requests.get(url, auth=HTTPBasicAuth(token, ""))
+    resp = requests.get(url, auth=HTTPBasicAuth(token, ""), verify="./my_server_cert.pem")
     if resp.status_code != 200:
         print(f"Failed to fetch data: {resp.text}")
         sys.exit(1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions