Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't generate SECRET_KEY.

See original GitHub issue

In it says to generate the SECRET_KEY from the django shell, but in fact, you can’t run the shell itself unless your SECRET_KEY is set-up.

That’s why I suggest to remove the environment variable and put a SECRET_KEY generated prior so that people can generate it on their machine and then use the python-dotenv library to keep their virtual environment variables in a .env file.


Also, set Debug to True since it’s the development code.

Edit 2: might have to be updated accordingly.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

Animesh-Ghoshcommented, Aug 2, 2019

I guess now everything is clear. CONTRIBUTING can be updated now, These are the final steps:

1. Create virtual environment (using virtualenv - prerequistie)

2. Clone the repo.

3. Install Dependencies

4. Run the commands to generate the `SECRET_KEY`

5. Create a `.env` file add the key to it.

6. Create your feature branch .

7. Make changes.

8. Push Your changes.

9. 🎉

Maybe move some stuff from CONTRIBUTING to README? I feel as if a lot of README worthy stuff is in CONTRIBUTING. I suggest moving “About the Project” and “Getting Started” to the README and we can put the “Installation” heading in the README under “Getting Started” heading.

How about this for “Getting Started”?:

  1. Clone the repository.
  2. Create virtual environment.
  3. Install dependencies.
  4. Generate secret key from Django’s shell.
  5. Create .env file and put the key and other virtual environment variables in.

Separate points 6 through 9 in the CONTRIBUTING section.

Animesh-Ghoshcommented, Aug 2, 2019

Shall I get started? will need to be updated as well. Need to comment out the SECRET_KEY and LOCAL_HOST variables. Then mention uncommenting those out in the README as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Secret key can not be omitted · Issue #1936 · argoproj/argo-cd
So the server.secretkey has to have a unique value and should be generated on its own. We cannot assign a value of our...
Read more >
Generate Secret Key - Okta Support
Hi Everyone, I have a question - whether Okta administrator can generate secret key for Okta Verify for a normal user?
Read more >
android - Get the SecretKey value generated by KeyGenerator ...
Problem : I am unable to get the string/bytes value of the SecretKey which I want to encrypt.
Read more >
SonarQube DE Container - Unable to Encrypt Values (cannot ...
I do the following: generate the secret key; save the key to /root/.sonar/sonar-secret.txt on the container; change file ownership to ...
Read more >
Find your Secret Key or Setup Code - 1Password Support
You can find your Secret Key and Setup Code in the 1Password app on any device where you're already signed in to your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found