---
title: "Discussion on \"My Django Secret Key Was Public on GitHub - How I Fixed It\" | Hashnode"
description: "Discussion on \"My Django Secret Key Was Public on GitHub - How I Fixed It\". Accidentally pushed your Django key to GitHub? Don't panic. Here is a step-by-step guide to rotate your secret key and secure it using .env."
url: "https://hashnode.com/posts/my-django-secret-key-was-public-on-github-how-i-fixed-it/6aad07bc9111b6921c39bb6f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [My Django Secret Key Was Public on GitHub - How I Fixed It](https://natgian.hashnode.dev/my-django-secret-key-was-public-on-github-how-i-fixed-it?utm_source=hashnode&utm_medium=feed)

Accidentally pushed your Django key to GitHub? Don't panic. Here is a step-by-step guide to rotate your secret key and secure it using .env.

Sep 18 · 3 min read · natgian.hashnode.dev  
Updated Sep 21  
Read the article

-   [#django](https://hashnode.com/tag/django)
-   [#python](https://hashnode.com/tag/python)
-   [#security](https://hashnode.com/tag/security)
-   [#github](https://hashnode.com/tag/github)
-   [#tutorials](https://hashnode.com/tag/tutorials)

## Written by

[Nathalie Giancaspro](https://hashnode.com/@natgian)

@natgian · Zurich, Switzerland

  
[View profile](https://hashnode.com/@natgian)

Sharing my learning journey...

I'm a Full-Stack Web Developer and enthusiastic nature photographer from Switzerland.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
