-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saving to Keyring in Docker on synology NAS #539
Comments
I just wanted to add that I have the same issue too |
I found notes about Docker & Keyring Using Keyring on headless Linux systems in a Docker container. See if that helps |
From some reading, it seems base64.encodestring() and base64.decodestring() have been deprecated since Python 3.1 and now removed in 3.9.1. base64.encodebytes() and base64.decodebytes() should be used instead. |
Looks like I have more learning to do. I am a complete Docker noob, and know almost nothing about Python, haha. The basement stuff makes sense, based on a quick google search, so thanks for that info, and a point in the right direction. I’ll still keep this open, in case anyone has the same problem, or a fix. Thanks! |
Hmm... We are using 3.9 and possibly introduced regression by not sticking to exact minor versions... Should be reproducible outside of docker too (e.g. in packaged binaries). If reproduced, we can possibly mitigate by pinning python to 3.9.0 |
Docker and systems using it (e.g. Kubernetes) have mechanisms to pass secrets to container. That would be canonical solution rather than granting container a privileged access to the host (in order to use keyring from inside the container). Probably need to tweak |
I just checked that packaged executable for windows saves to and uses from keyring successfully. It is also packaged with 3.9, so it is version/platform combo. Tried docker with |
It looks like keyrings.alt made the fix a couple of years ago here: jaraco/keyrings.alt#40 |
I cannot repro the issues in 1.8.0. Closing the issue. @Jholmgren5 if you see the issue again in 1.8.0, pls reopen |
Thanks for the help! It looks like version 1.8.0 is broken in some way, at least for my case. The container is significantly smaller in size too. This is what happens when I try to download the 10 most recent photos. I installed this container separately, alongside 1.7.3, in order to test it. 2023-01-28 14:32:17 DEBUG Authenticating... |
@Jholmgren5 I believe keyring issue is fixed in 1.8.1. |
@AndreyNikiforov it works great now! Thanks so much for the help! This a game changer for me to backup my photos. |
Having an issue with Python and saving to system keyring. Using a fully updated synology NAS with Docker. Everything works fine, and I can pull photos down, log in, 2FA, etc, all working. However when I go to save my iCloud password, after i type “y”, this is the error:
ave password in keyring? [y/N]: y
Traceback (most recent call last):
File "/usr/bin/icloud", line 8, in
sys.exit(main())
File "/usr/lib/python3.9/site-packages/pyicloud_ipd/cmdline.py", line 209, in
main
utils.store_password_in_keyring(username, password)
File "/usr/lib/python3.9/site-packages/pyicloud_ipd/utils.py", line 53, in sto
re_password_in_keyring
return keyring.set_password(
File "/usr/lib/python3.9/site-packages/keyring/core.py", line 48, in set_passw
ord
_keyring_backend.set_password(service_name, username, password)
File "/usr/lib/python3.9/site-packages/keyrings/alt/file_base.py", line 90, in
set_password
password_base64 = base64.encodestring(password_encrypted).decode()
AttributeError: module 'base64' has no attribute 'encodestring'
When I type in my password, my iDevice does pop up with a 2FA alert.
The text was updated successfully, but these errors were encountered: