Closed stefanvdv closed 3 years ago
You should be able to add Verify=False
on the end of the request method call, i.e. somethign like requests.get('https://google.com', verify=False)
in order to disable SSL Cert checking
EDIT: Ah okay so theres no direct usage of the request method, its being called in pynetbox. After a bit of googling, the following should also do the trick. Somewhere right after line 339
add: nb.http_session.verify = False
I got it working by changing
nb = pynetbox.api(nbUrl, token=nbToken)
in nb-dt-import.py to contain a ssl_verify variable pointing to the cert:
nb = pynetbox.api(nbUrl, token=nbToken, ssl_verify='<path-to-cert>')
You can also set ssl_verify=False
but that'll generate tons of spam in your output about it being disabled so this was cleaner.
Works fine except the warning that my cert has no SAN entries (but that's my own fault)
I got it working by changing
nb = pynetbox.api(nbUrl, token=nbToken)
in nb-dt-import.py to contain a ssl_verify variable pointing to the cert:nb = pynetbox.api(nbUrl, token=nbToken, ssl_verify='<path-to-cert>')
You can also setssl_verify=False
but that'll generate tons of spam in your output about it being disabled so this was cleaner.Works fine except the warning that my cert has no SAN entries (but that's my own fault)
Hey @johskar in which format '
@johskar you can also put the following towards the top of your file to silence the warning output and also not have to go through the trouble of generating your own certs, etc.
import requests
requests.packages.urllib3.disable_warnings()
Hi,
I'm getting following error:
requests.exceptions.SSLError: HTTPSConnectionPool(host='x.x.x.x', port=443): Max retries exceeded with url: /api/dcim/manufacturers/?name=Juniper (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1123)')))
Is it possible to add the option not to validate the cert. (working with self signed certs).
Kind regards,
Stefan