conf-python-jamf not saving config
shaquir opened this issue · comments
When attempting to setup jctl, running conf-python-jamf results in this error:
$ conf-python-jamf
Hostname (don't forget https:// and :8443): website
username: name
Password:
Traceback (most recent call last):
File "/Library/Python/3.7/site-packages/keyring/backends/macOS/__init__.py", line 41, in set_password
api.set_generic_password(self.keychain, service, username, password)
File "/Library/Python/3.7/site-packages/keyring/backends/macOS/api.py", line 161, in set_generic_password
Error.raise_for_status(status)
File "/Library/Python/3.7/site-packages/keyring/backends/macOS/api.py", line 114, in raise_for_status
raise cls(status, "Unknown Error")
keyring.backends.macOS.api.Error: (-25308, 'Unknown Error')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/conf-python-jamf", line 10, in <module>
sys.exit(main())
File "/Library/Python/3.7/site-packages/jamf/setconfig.py", line 119, in main
setconfig(sys.argv[1:])
File "/Library/Python/3.7/site-packages/jamf/setconfig.py", line 113, in setconfig
conf.save(config_path=config_path)
File "/Library/Python/3.7/site-packages/jamf/config.py", line 122, in save
keyring.set_password(self.hostname, self.username, self.password)
File "/Library/Python/3.7/site-packages/keyring/core.py", line 60, in set_password
get_keyring().set_password(service_name, username, password)
File "/Library/Python/3.7/site-packages/keyring/backends/macOS/__init__.py", line 45, in set_password
raise PasswordSetError("Can't store password on keychain: " "{}".format(e))
keyring.errors.PasswordSetError: Can't store password on keychain: (-25308, 'Unknown Error')
While your document mentions support for python 3.7, after looking at keyring I tried updating to 3.8.10 but I am still getting the same error
jctl Version:
$ jctl --version
jctl 1.1.15
python_jamf 0.7.4 (0.6.9 required)
I also get a similar error with trying to set a plist:
$ conf-python-jamf -C ~/Library/Preferences/edu.utah.mlib.jamfutil.plist
Hostname (don't forget https:// and :8443): hs
username: a
Password:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/keyring/backends/macOS/__init__.py", line 41, in set_password
api.set_generic_password(self.keychain, service, username, password)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/keyring/backends/macOS/api.py", line 161, in set_generic_password
Error.raise_for_status(status)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/keyring/backends/macOS/api.py", line 114, in raise_for_status
raise cls(status, "Unknown Error")
keyring.backends.macOS.api.Error: (-25308, 'Unknown Error')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/bin/conf-python-jamf", line 8, in <module>
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/jamf/setconfig.py", line 119, in main
setconfig(sys.argv[1:])
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/jamf/setconfig.py", line 113, in setconfig
conf.save(config_path=config_path)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/jamf/config.py", line 122, in save
keyring.set_password(self.hostname, self.username, self.password)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/keyring/core.py", line 60, in set_password
get_keyring().set_password(service_name, username, password)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/keyring/backends/macOS/__init__.py", line 45, in set_password
raise PasswordSetError("Can't store password on keychain: " "{}".format(e))
keyring.errors.PasswordSetError: Can't store password on keychain: (-25308, 'Unknown Error')
Issue was with method of accessing my machine's terminal and Apple's keychain restrictions.
No issues on new machine. Tested locally on original (issue) machine in terminal and works as expected.
Thanks for the project
Hi @shaquir:
Glad you solved the issue yourself and replying back with a status update.