I use Pushbullet CLI to send Pushbullet pushes from the terminal. It works fine when I execute it locally but when I ssh into the machine where it is installed and try to send a push I get a Python traceback:
% pb push test
Traceback (most recent call last):
File "/Users/db/Library/Python/3.11/lib/python/site-packages/keyring/backends/macOS/__init__.py", line 51, in get_password
return api.find_generic_password(self.keychain, service, username)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/keyring/backends/macOS/api.py", line 144, in find_generic_password
Error.raise_for_status(status)
File "/Users/db/Library/Python/3.11/lib/python/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 "/Users/db/Library/Python/3.11/bin/pb", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/pushbullet_cli/app.py", line 239, in push
_push(**kwargs)
File "/Users/db/Library/Python/3.11/lib/python/site-packages/pushbullet_cli/app.py", line 63, in _push
pb = _get_pb()
^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/pushbullet_cli/app.py", line 47, in _get_pb
password = keyring.get_password("pushbullet", "cli")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/keyring/core.py", line 55, in get_password
return get_keyring().get_password(service_name, username)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/keyring/backends/chainer.py", line 51, in get_password
password = keyring.get_password(service, username)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/keyring/backends/macOS/__init__.py", line 57, in get_password
raise KeyringError("Can't get password from keychain: " "{}".format(e))
keyring.errors.KeyringError: Can't get password from keychain: (-25308, 'Unknown Error')
I guess the problem is that the shell I get when I SSH is different from a local shell, but how do I fix it?