-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Store passwords in the system keychain #210
Comments
I believe this could be implemented by replacing: if not password:
password = self._io.ask_hidden("Password:") by something like: if not password:
try:
import keyring
if keyring.get_keyring():
password = keyring.get_password(repository_name, username)
except ImportError:
print("Install keyring to store passwords securely")
keyring = None
if not password:
password = self._io.ask_hidden("Password:")
if keyring and keyring.get_keyring():
keyring.set_password(repository_name, username, password) in |
If this approach was taken, why not simply make |
Yeah, that’s probably a better idea. Then it would be available when Poetry is installed via pipsi. I was copying the behavior of Flit, where it’s optional, but the advantages of doing it that way seem minor. |
This change introduces the use of system keyring to store repository passwords when one is available. Passwords are added to and removed from the keyring using the config command. Resolves: python-poetry#210
This change introduces the use of system keyring to store repository passwords when one is available. Passwords are added to and removed from the keyring using the config command. Resolves: python-poetry#210
This change introduces the use of system keyring to store repository passwords when one is available. Passwords are added to and removed from the keyring using the config command. Resolves: python-poetry#210
This change introduces the use of system keyring to store repository passwords when one is available. Passwords are added to and removed from the keyring using the config command. Resolves: python-poetry#210
@jacebrowning @osteele I have attempted an implementation using keyring in #774 . Would be great to get the change tested on different platforms. |
This change introduces the use of system keyring to store repository passwords when one is available. Passwords are added to and removed from the keyring using the config command. Resolves: python-poetry#210
This change introduces the use of system keyring to store repository passwords when one is available. Passwords are added to and removed from the keyring using the config command. Resolves: python-poetry#210
This change introduces the use of system keyring to store repository passwords when one is available. Passwords are added to and removed from the keyring using the config command. Resolves: python-poetry#210
This change introduces the use of system keyring to store repository passwords when one is available. Passwords are added to and removed from the keyring using the config command. Resolves: python-poetry#210
This change introduces the use of system keyring to store repository passwords when one is available. Passwords are added to and removed from the keyring using the config command. Resolves: python-poetry#210
This change introduces the use of system keyring to store repository passwords when one is available. Passwords are added to and removed from the keyring using the config command. Resolves: python-poetry#210
This change introduces the use of system keyring to store repository passwords when one is available. Passwords are added to and removed from the keyring using the config command. Resolves: python-poetry#210
This change introduces the use of system keyring to store repository passwords when one is available. Passwords are added to and removed from the keyring using the config command. Resolves: python-poetry#210
This change introduces the use of system keyring to store repository passwords when one is available. Passwords are added to and removed from the keyring using the config command. Resolves: #210
#774 fixes this issue. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Poetry currently requires either that you store your PyPI password in plaintext (via
poetry config http-basic.pypi username password
), or enter it on eachpoetry publish
. The first is insecure, the second is inconvenient.I like what Flit does: store the password in Keyring if that package is installed, and prompt the user to install it otherwise. (Keyring uses the system keychain, e.g. Keychain on macOS, the Freedesktop Secret Service standard on supported UN*X, WinVault on Windows.)
This relates to #111.
The text was updated successfully, but these errors were encountered: