Python Forum
encrypting PyPi passwords in pypirc - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/Forum-Python-Coding)
+--- Forum: General Coding Help (https://python-forum.io/Forum-General-Coding-Help)
+--- Thread: encrypting PyPi passwords in pypirc (/Thread-encrypting-PyPi-passwords-in-pypirc)



encrypting PyPi passwords in pypirc - dale2k9 - Jan-10-2019

How can I encrypt a password for use in the pypirc file for authentication to my PyPi repository? I understand that I can omit the password and get prompted in my local builds but for CI or automated builds I need to have the password in the file but our security policy won't allow the password to be stored in plain text. Any suggestions?


RE: encrypting PyPi passwords in pypirc - Larz60+ - Jan-11-2019

You can use passlib for this,
here's a blog on this: http://blog.tecladocode.com/learn-python-encrypting-passwords-python-flask-and-passlib/