Open hpanwar2 opened 5 years ago
Hi @hpanwar2 - what version of macOS are you using? That could be an error related to an old TLS version on your version of macOS.
You'll probably need TLS version 1.2 to be able to connect to your JSS.
Thanks for your quick reply. I am running Mac OS High Sierra 10.13.6 Regarding the TLS version i believe its TLS V1.2 as when i run "curl https://google.com/ --tlsv1.2 --verbose" command in terminal i get below result.
curl https://google.com/ --tlsv1.2 --verbose
GET / HTTP/1.1 Host: google.com User-Agent: curl/7.54.0 Accept: /
< HTTP/1.1 301 Moved Permanently < Location: https://www.google.com/ < Date: Mon, 11 Mar 2019 17:28:47 GMT < Expires: Wed, 10 Apr 2019 17:28:47 GMT < Cache-Control: public, max-age=2592000 < Server: gws < X-XSS-Protection: 1; mode=block < X-Frame-Options: SAMEORIGIN < Alt-Svc: quic=":443"; ma=2592000; v="46,44,43,39" < Content-Length: 220 < Content-Type: text/html; charset=UTF-8 < Via: 1.1 proxy-ii500-ip2.uhc.com:80 (Cisco-WSA/9.0.1-162) < Connection: keep-alive <
301 Moved 301 Moved
The document has moved here.
It looks like Ben had a similar issue, and had to explicitly enter the port number in the url during the setup for this to work. (I have it working on Jamf Cloud).
https://github.com/eventbrite/Casper-API-Tools/issues/1
Maybe try that?
Thanks.
Thanks for the update, i did follow the steps suggested to ben, nothing really work i can run python CasperAPI_CLI.py -h however nothing apart from this. i have reset up the whole process and used :8443 after the JSS url also put sudo in bash_profile. I am getting the same error
Hi I am trying to run CasperAPI.py to unmanage macs and perform other tasks. However when i run this i get below error message I am running this as admin, i have also remove and re-setup this on my Mac however stil giving me issues.
LAxxxxxxxxx:CasperAPI username$ python CasperAPI_CLI.py unmanagecomputer xxxx Unmanaging computer xxxx... Traceback (most recent call last): File "CasperAPI_CLI.py", line 2006, in
main()
File "CasperAPI_CLI.py", line 1939, in main
unmanageComputer(computerID, user, password)
File "CasperAPI_CLI.py", line 1335, in unmanageComputer
response = sendAPIRequest(putStr, username, password, 'PUT', putXML)
File "CasperAPI_CLI.py", line 121, in sendAPIRequest
response = urllib2.urlopen(request, XML)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open '_open', req) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(*args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1240, in https_open context=self._context) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1197, in do_open raise URLError(err) urllib2.URLError: <urlopen error [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)>