pycontribs / jira

Python Jira library. Development chat available on https://matrix.to/#/#pycontribs:matrix.org
https://jira.readthedocs.io
BSD 2-Clause "Simplified" License
1.96k stars 870 forks source link

SSL Certificate Not Sent #1573

Closed Minweiwangaaaa closed 1 year ago

Minweiwangaaaa commented 1 year ago

Bug summary

error

  File "/Library/Python/3.9/site-packages/jira/resilientsession.py", line 69, in raise_on_error
    raise JIRAError(
jira.exceptions.JIRAError: JiraError HTTP 400 url: https://jira.xxxx.com/rest/api/2/serverInfo
    text: <html>
<head>
<title>400 Required SSL Certificate Not Sent</title>

My code:

   passaa = "xxxxxx=="
    uPass = base64.b64decode(passaa).decode('UTF-8')

    jira_options = {
        'server': 'https://jira.xxxxxx.com/',
        'verify': './akamai.cer',
        'basic_auth':('myname', uPass)
    }

    jira = JIRA(jira_options)

Is there an existing issue for this?

Jira Instance type

Jira Server or Data Center (Self-hosted)

Jira instance version

Atlassian Jira Project Management Software (v8.8.1#808001-sha1:e5cdcf9)

jira-python version

3.4.1

Python Interpreter version

3.8

Which operating systems have you used?

Reproduction steps

My code:

   passaa = "xxxxxx=="
    uPass = base64.b64decode(passaa).decode('UTF-8')

    jira_options = {
        'server': 'https://jira.xxxxxx.com/',
        'verify': './akamai.cer',
        'basic_auth':('myname', uPass)
    }

    jira = JIRA(jira_options)

### Stack trace

```python
Traceback (most recent call last):
  File "/Users/xxxx/PycharmProjects/pythonProject/fortify.py", line 378, in <module>
    postToJira('aaaa')
  File "/Users/xxxxx/PycharmProjects/pythonProject/fortify.py", line 371, in postToJira
    jira = JIRA(jira_options)
  File "/Library/Python/3.9/site-packages/jira/client.py", line 574, in __init__
    si = self.server_info()
  File "/Library/Python/3.9/site-packages/jira/client.py", line 3059, in server_info
    j = self._get_json("serverInfo")
  File "/Library/Python/3.9/site-packages/jira/client.py", line 3764, in _get_json
    r = self._session.get(url, params=params)
  File "/Library/Python/3.9/site-packages/requests/sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "/Library/Python/3.9/site-packages/jira/resilientsession.py", line 223, in request
    elif raise_on_error(response, **processed_kwargs):
  File "/Library/Python/3.9/site-packages/jira/resilientsession.py", line 69, in raise_on_error
    raise JIRAError(
jira.exceptions.JIRAError: JiraError HTTP 400 url: https://jira.xxxx.com/rest/api/2/serverInfo
    text: <html>
<head>
<title>400 Required SSL Certificate Not Sent</title>
</head>
<body bgcolor="white">
<center>

Expected behaviour

Traceback (most recent call last): File "/Users/xxxx/PycharmProjects/pythonProject/fortify.py", line 378, in postToJira('aaaa') File "/Users/xxxxx/PycharmProjects/pythonProject/fortify.py", line 371, in postToJira jira = JIRA(jira_options) File "/Library/Python/3.9/site-packages/jira/client.py", line 574, in init si = self.server_info() File "/Library/Python/3.9/site-packages/jira/client.py", line 3059, in server_info j = self._get_json("serverInfo") File "/Library/Python/3.9/site-packages/jira/client.py", line 3764, in _get_json r = self._session.get(url, params=params) File "/Library/Python/3.9/site-packages/requests/sessions.py", line 600, in get return self.request("GET", url, kwargs) File "/Library/Python/3.9/site-packages/jira/resilientsession.py", line 223, in request elif raise_on_error(response, processed_kwargs): File "/Library/Python/3.9/site-packages/jira/resilientsession.py", line 69, in raise_on_error raise JIRAError( jira.exceptions.JIRAError: JiraError HTTP 400 url: https://jira.xxxx.com/rest/api/2/serverInfo text:

400 Required SSL Certificate Not Sent
### Additional Context _No response_