73 questions
Advice
0
votes
1
replies
93
views
What are other alternatives for python keyring?
I'm trying to find a secure way to store token for my cli application. In the app I take the token from ms entra id and I want to store this token in user computer so that user can use it again until ...
1
vote
1
answer
109
views
GCP keyring authentication not working in Docker build
I am able to install my python package from GCP Artifactory.
Authenticate to GCP.
% gcloud auth application-default login
Your browser has been opened to visit:
https://accounts.google.com/o/...
0
votes
1
answer
279
views
How do I delete a password set using Python's keyring library?
I used the keyring library in Python to store a password needed to logon to an external service.
import keyring
keyring.set_password("service_name", "username", "my_password&...
0
votes
2
answers
106
views
How to access files owned by a user in an application
Context
Imagine I have a application with a Python server running as user 'python-app' on Linux and a Python client also running as user 'python-app'. The user 'python-app' does not have root ...
3
votes
1
answer
472
views
Python Keyring does not overwrite entry but creates new entry
I'm having trouble with the python keyring library. I want to extract passwords from an entry in the windows credential manager. After that I want to overwrite the password of that specific entry. ...
0
votes
1
answer
463
views
keyring error when importing: module 'io' has no attribute 'text_encoding'
When importing keyring,
import keyring
for some reason I keep on getting error message: "AttributeError: module 'io' has no attribute 'text_encoding' "
the line preceding the error refers ...
1
vote
1
answer
596
views
Problem with keyring.get_credential() returning None
I am trying to use the keyring library from Python 3 to store and retrieve credentials for a user. The following simple example should store a password, read it back, and then read both the username ...
1
vote
1
answer
287
views
Nuitka compilation error: No keyring backend available
I’m trying to compile a small python file which sends email based on the yagmail library, which itself relies on the keyring library.
Compiling works fine. Executing with dry-run options works fine. ...
1
vote
0
answers
1k
views
How do I retrieve a password from Keychain Access using keyring?
"Keeping credentials safe in Jupyter Notebooks" (https://towardsdatascience.com/keeping-credentials-safe-in-jupyter-notebooks-fbd215a8e311) says that "Keyring integrates with your OS ...
0
votes
1
answer
579
views
Unable to use Python keyring module from systemd service
I want a python script to automatically start after boot on a linux computer. To achieve this I set up a systemd service:
[Unit]
Description=My Script Service
Wants=network-online.target
After=network-...
12
votes
4
answers
6k
views
Working Poetry project with private dependencies inside Docker
I have a Python library hosted in Google Cloud Platform Artifact Registry. Besides, I have a Python project, using Poetry, that depends on the library.
This is my project file pyproject.toml:
[tool....
0
votes
1
answer
793
views
Python python_keyring package - Upgrade of Python has broken keyring
I have upgrade from python 3.9.6 to 3.10.5 and kept thankfully the old version. This is on a Win-64 machine so should be using the WinVault backend (default)
I have copied all the site_packages from 3....
2
votes
1
answer
521
views
Keyring stops working after first get_password() call when running Flask project with gunicorn in supervisor
I'm trying to run a instance of a flask project with gunicorn on supervisor and I'm facing a issue where I'm not able to retrieve passwords from keyring after the first get_password() is called. After ...
1
vote
0
answers
679
views
Access user keyring from systemd hook or crontab
I'm trying to implement a systemd hook (systemd-sleep) to connect and disconnect from protonvpn. However, these scripts are executed as root and do not have access to the keyring. The backend is ...
4
votes
2
answers
1k
views
Pycharm not working with Google Artifact Repository keyring, keeps asking for user
On my OSX M1 Mac I have the following keyring setup which works with Google Artifact Repository to resolve dependencies when using python on the command line shell.
Refer to https://cloud.google.com/...
3
votes
2
answers
9k
views
How do I list and access the secrets stored in Ubuntu's keyring from the command line?
I see this in the help
keyring -h
usage: keyring [-h] [-p KEYRING_PATH] [-b KEYRING_BACKEND] [--list-backends] [--disable]
[operation] [service] [username]
positional arguments:
...
0
votes
0
answers
258
views
Retrieve keyring username on python
I have got keyring concept. And I'm trying to get the username list from it.
Unfortunately it seems there is no function for get saved username list.
I hope to show the saved list and choose one for ...
2
votes
1
answer
952
views
Hiding passwords in python file
I have a Python application that has a file containing several hardcoded databases credentials. I have to find a way to hide these information, because keeping usernames and passwords in the code is ...
0
votes
1
answer
916
views
Python Keyring throws error "OSError: [WinError 8] Not enough memory resources are available to process this command"
I'm using python 3.10 and the following code works once after startup, but then if I try and set any new password to the keyring, the following errors are thrown.
import keyring
keyring.set_password(&...
0
votes
1
answer
865
views
How can I serialize a Python request's cookies for UTF-8 storage?
I am making a series of API calls using Python similar to the following:
response = requests.post('https://httpbin.org/post', data = {'key':'value'})
When my API call is successful, I am able to view ...
1
vote
1
answer
986
views
How to securely store Azure DevOps PAT token in a GitHub repo?
My GitHub action would try to get a python package from Azure DevOps Artifacts. It needs Azure DevOps credentials to access that package. I made it work using Basic HTTP Authentication.
https://...
0
votes
1
answer
210
views
how to capture the python output in a shell variable from expect?
I want to get the pw value from python, something like
spawn python3 $pscript
expect "password:"
send "$enc_password\r"
set outcome $expect_out(buffer) --getting empty array in ...
2
votes
1
answer
2k
views
Python3 on WSL 2 takes forever (over 6 minutes) to import keyring
I noticed this issue when trying to run pip commands on my WSL2 Ubuntu-20.04 machine that it would take a long time to run anything. I finally narrowed it down to when pip is importing the keyring ...
0
votes
1
answer
4k
views
Python: jupyter-notebook. keyring module. TypeError: entry_points() got an unexpected keyword argument 'group'
I'm trying to use the keyring module in jupyter notebook.
import keyring
keyring.set_password('system',
'test',
'1234')
I got the following output:
-----------...
16
votes
3
answers
8k
views
On WSL2 `pip install virtualenv` comand hangs for too long
Under WSL2 running Ubuntu 20.04 I've tried to install virtualenv with pip running pip install virtualenv but the command just hangs printing nothing.
I terminated it and ran it again with python3 -v -...
3
votes
2
answers
1k
views
Consume python package from Azure feed in a local (not Azure) docker instance
I have created a PoC Azure pipeline to create a package in a feed, as below:
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
...
1
vote
2
answers
1k
views
R keyring package - my keyring has disappeared (maybe), what happened to it and what keyring do I have now?
I've been using keyring reliably for months. All of a sudden, a bunch of scripts failed because my code to pull keys is returning nothing. I had a named keyring with a passcode. It appears to be gone.
...
0
votes
1
answer
370
views
using python keyring on app used across multiple devices
I am looking for a way to share my app with my coworkers without giving them the credentials for the database that the app accesses. I found keyring (https://pypi.org/project/keyring/) and thought ...
0
votes
1
answer
911
views
Python keyring directly showing password without prompting master password
import keyring
keyring.set_password('test_db','louis','secret123')
keyring.get_password('test_db','louis')
'secret123'
0
votes
1
answer
2k
views
how to reset the keyring of stored email password in Visual Studio Code in Windows with yagmail?
I'm using knockknock to email myself when training a model is complete.
I am using VS Code. The first time I
use the @email_sender(recipient_emails=email_address), it prompted me for a password, ...
0
votes
1
answer
296
views
Secure password store for Python CGI (Windows+IIS+Windows authentification)
I need to develope a python cgi script for a server run on Windows+IIS. The cgi script is run from a web page with Windows authentification. It means the script is run under different users from ...
19
votes
1
answer
18k
views
Keyring Warning when running pip list -o
I've been trying to run pip list -o and pip list --outdated to see if any packages need to be updated but it enters a loop of printing: WARNING: Keyring is skipped due to an exception: Failed to ...
0
votes
1
answer
2k
views
get keyring password with blank username
I have existing windows credentials in the credential manager with a blank username. It doesn't appear that the keyring package can read these:
import keyring
keyring.set_password("test", "", "...
0
votes
1
answer
934
views
Retrieve Remmina password from Ubuntu keyring in Ansible?
I can add passwords to Ubuntu's system keyring, retrievable by Ansible, with the command
keyring set myservice username
by installingsudo apt install python-keyring. This password is then retrievable ...
0
votes
1
answer
746
views
Missing dependency "keyring: None (NoK)" in Spyder 4
Having recently upgraded to Spyder 4 on Anaconda, I am getting this Error message:
I am aware of this question, but that relates to Spyder 3, and is not working in my case.
My system runs on Linux ...
6
votes
2
answers
23k
views
RuntimeError: No recommended backend was available. (Keyring w/ Python)
I have a program which uses Yagmail and the keyring package to safley store email credentials. When I run this script in atom.io and idle it works.
However, after I packaged it with pyinstaller it is ...
0
votes
0
answers
482
views
Set expiration of password on keyring - Python
I'm trying to figure out on how to set expiration of the password on the keyring.
Example: I want the password to be automatically deleted after 24hours or once the system is rebooted.
I just ...
6
votes
1
answer
4k
views
How to disable command line password prompt for python's keyring - headless debian linux
Problem:
I would like to use python's keyring library in a headless Linux environment, specifically a Debian 9 GCP compute instance. I have a cron job that wakes up every so often to run a python ...
0
votes
1
answer
2k
views
Unlock gnome-keyring from a temp dbus session
I'm trying to write a python application that can unlock gnome-keyring from a text-only system (headless machine) and retrieve the credentials. I have the gnome-keyring package installed in this ...
25
votes
1
answer
15k
views
Missing dependencies causing Keyring error when opening Spyder3 on Ubuntu18?
I'm fairly new to programming and such. I'm trying to use Spyder3, and I keep getting this error (below). I am using Geforce 1080ti, Ubuntu 18.04.01, python3.3.6, python2 is not installed. I tried $ ...
1
vote
1
answer
788
views
Are there any python modules to store passwords securely in .conf/.txt files?
I am trying to read and write username and password in a secured manner. With my current implementation I am following AES-CBC encryption/decryption but storing the encrypted username the with random ...
1
vote
3
answers
5k
views
RuntimeError: Unable to initialize SecretService: Environment variable DBUS_SESSION_BUS_ADDRESS is unset
Running into issue with keyring:
RuntimeError: Unable to initialize SecretService: Environment variable DBUS_SESSION_BUS_ADDRESS is unset
SecretService is installed.
OS is RHEL
Running:
python -c &...
5
votes
2
answers
9k
views
Avoid keyring messages when running command line tools
I am getting these two messages when running a command line utility (in the case pgcli) in an headless Linux running in Docker:
No handlers could be found for logger "keyring.backend"
Please enter ...
4
votes
0
answers
1k
views
Why does the Python keyring package generate this warning on macOS?
The following is what I see when I import keyring in Python 3 on a macOS 10.13 system:
# python3 ...
5
votes
2
answers
2k
views
Pyinstaller Keyring Windows 32 bit
I have the following python test code:
import keyring
print(keyring.get_keyring())
keyring.set_password("a","b","c")
print(keyring.get_password("a","b"))
If I run this code using a 32 bit python or a ...
1
vote
2
answers
2k
views
Using Keyring in cx_Freeze : No recommended backend was available
I am trying to build an exe file using cx_Freeze from target.py which has an import of keyring in the code. I succeeded in building the exe file, but calls an error saying "No recommended backend was ...
5
votes
0
answers
229
views
How to use Python SecretStorage with GObject.timeout_add - Gtk3
I try to use SecretStorage in 2 Python processes, but when I try to update my Gtk.Window I get this message most of the time:
RuntimeError: Unable to initialize SecretService: Did not receive a
...
2
votes
1
answer
664
views
How can I use Python Keyring in conjunction with Box API OAuth2?
I'm pretty new to Python and programming and I am trying to figure out how to automate the box.com authentication process and it's kicking my butt. Any help would be appreciated!
I have this code ...
5
votes
1
answer
4k
views
whick keyring backend on rhel7 Linux to avoid extra password when storing credential?
I install the following packages (not all can be install on both platform) :
Python 3.5.4 :: Anaconda custom (64-bit)
keyring 9.3.1
keyring_jeepney 0.2
keyrings.alt 1.2
SecretStorage 2.3.1
on both a ...
0
votes
0
answers
170
views
Using keyring Library With ConfigParser
I have a config file like this:
user=cn=read-only-admin,dc=example,dc=com
password=somepassword
I want to save password to keyring. I can use keyrin password in python files with keyring library :
...