nzaillian / django-encrypted-secrets Goto Github PK
View Code? Open in Web Editor NEWEncrypted secrets for Django applications
License: MIT License
Encrypted secrets for Django applications
License: MIT License
cwd: /tmp/pip-install-m3fxu64u/django-encrypted-secrets/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-m3fxu64u/django-encrypted-secrets/setup.py", line 4, in <module>
with open(os.path.join(os.path.dirname(__file__), 'README-pypi.md')) as readme:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-m3fxu64u/django-encrypted-secrets/README-pypi.md'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
E.g. mistyping :
as -
would result in edit_secrets
failing until all get_secret
lines in django application are commented out.
Running
./manage.py init_secrets
the first time generates master.key
and secrets.yml.enc
but produces the following
error below. It could not find the key (key is None
). Running the same command the second time (after running it the first time) doesn't return an error, which I assume it uses the master.key
it had generated when the command was run the first time.
โ ./manage.py init_secrets
Traceback (most recent call last):
File "./manage.py", line 29, in <module>
main()
File "./manage.py", line 21, in main
load_secrets()
./env/lib/python3.7/site-packages/encrypted_secrets/__init__.py", line 74, in load_secrets
SecretsManager.load(**kwargs)
./env/lib/python3.7/site-packages/encrypted_secrets/__init__.py", line 20, in load
cls.load_from_yaml(encrypted_secrets_file_path, key)
./env/lib/python3.7/site-packages/encrypted_secrets/__init__.py", line 26, in load_from_yaml
secrets_yaml = read_secrets(encrypted_secrets_file_path, key)
./env/lib/python3.7/site-packages/encrypted_secrets/util.py", line 37, in read_secrets
cipher = AESCipher(message, key)
./env/lib/python3.7/site-packages/encrypted_secrets/crypto/aes.py", line 10, in __init__
self.key = sha256(key.encode()).digest()[:32]
AttributeError: 'NoneType' object has no attribute 'encode'
When trying to use this on Windows, pycrypto failed to install. When I looked up the error, I saw:
It is old and not maintained and contains many vulnerabilities. Use pycryptodome (https://github.com/Legrandin/pycryptodome) instead - it is compatible and up to date.
Hey there, thanks for this project! I was wondering what you think about adding a --path
or --file
option (and equivalent argument to load_secrets
) to support multiple environments (secrets.production.env.enc
etc).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.