Can't connect to JIRA Python through REST api https url
Question: I try to connect to a jira dev sandbox through https but it comes up with an
SSL23_GET_SERVER_HELLO:unknown protocol error

This is the error log/stack trace. I try both ports 8080 and 443 but no joy.

    
    
    >>> from jira.client import JIRA
    
    
    >>> options = {'server':'localhost:8080'}
    
    >>> auth = ('username', 'password')
    >>> jira = JIRA(options, auth)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/ve/lib/python2.6/site-packages/jira/client.py", line 88, in __init__
        self._create_http_basic_session(*basic_auth)
      File "/home/ve/lib/python2.6/site-packages/jira/client.py", line 1369, in _create_http_basic_session
        r = self._session.post(url, data=json.dumps(payload))
      File "/home/ve/lib/python2.6/site-packages/requests/sessions.py", line 284, in post
        return self.request('post', url, data=data, **kwargs)
      File "/home/ve/lib/python2.6/site-packages/requests/sessions.py", line 241, in request
        r.send(prefetch=prefetch)
      File "/home/ve/lib/python2.6/site-packages/requests/models.py", line 638, in send
        raise SSLError(e)
    requests.exceptions.SSLError: [Errno 1] _ssl.c:480: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
    
    >>> options = {'server':'localhost:443'}
    
    >>> auth = ('username', 'password')
    >>> jira = JIRA(options, auth)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/ve/lib/python2.6/site-packages/jira/client.py", line 88, in __init__
        self._create_http_basic_session(*basic_auth)
      File "/home/ve/lib/python2.6/site-packages/jira/client.py", line 1369, in _create_http_basic_session
        r = self._session.post(url, data=json.dumps(payload))
      File "/home/ve/lib/python2.6/site-packages/requests/sessions.py", line 284, in post
        return self.request('post', url, data=data, **kwargs)
      File "/home/ve/lib/python2.6/site-packages/requests/sessions.py", line 241, in request
        r.send(prefetch=prefetch)
      File "/home/ve/lib/python2.6/site-packages/requests/models.py", line 631, in send
        raise ConnectionError(sockerr)
    requests.exceptions.ConnectionError: [Errno 110] Connection timed out
    >>> 
    


Answer: Try this:

    
    
    from jira.client import JIRA
    options = {'server':'localhost:8080'}
    jira = JIRA(options)
    jira = JIRA(basic_auth=('username', 'password')) 
    

If it doesn't help, any chance the have [`OpenSSL`
conflicts](http://sourceforge.net/p/curl/bugs/990/)?

> When curl is linked against OpenSSL 0.9.8 and tries to access a server
> running OpenSSL 1.0.0, the SSL handshake fails with: curl: (35)
> error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:reason(1112)

