Add client certificate to Bugwarrior requests

I’ll probably need this again so writing it up: #bugwarrior is an awesome little helper syncing tasks to #taskwarrior (where I use #timewarrior to track hours spent). It connects to various ticket systems like #Redmine, #Jira or #GitLab.

Today I had to tweak it a little though, because I have no idea where to put client certificates for Python’s requests lib and my current customer requires that. Any HTTPS request without will fail with status code 400: No required SSL certificate was sent.

For this I edited ~/.local/lib/python3.11/site-packages/bugwarrior/services/gitlab.py line 364 from this:

response = requests.get(url, headers=headers, verify=self.verify_ssl, **kwargs)

to

response = requests.get(url, cert=('/path/to/client.crt', '/path/to/client.key'), headers=headers, verify=self.verify_ssl, **kwargs)

Important: Any request to _some_ GitLab by Bugwarrior will offer the client cert now. That’s fine for me because I’ve currently only one GitLab system to check at the moment. There may be better ways to achieve this but I’ve seen no obvious in the docs at https://bugwarrior.readthedocs.io/en/latest/services/gitlab.html – YMMV.