Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 133939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:31:23+00:00 2026-05-11T06:31:23+00:00

Say my application has a configuration files in plain-text. They contain some sensitive information

  • 0

Say my application has a configuration files in plain-text. They contain some sensitive information which is required to test the application in my dev environment. I use different OSes to access and work on my projects (win, mac, … ).

I do not wish some of the information in the configuration files to make it to my public git repository. In best case I want the sensitive information to be replaced with placeholders and have the configuration files uploaded to the repository to keep track of their structure.


How would you approach the problem?

The hook itself wouldn’t be much of a problem for me to write. I’m more interested how to tie it all together, possible directory structure, etc. I’m quite new to git.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T06:31:24+00:00Added an answer on May 11, 2026 at 6:31 am

    There’s a convention followed in the Django world that you could use – there is a standard settings.py file that imports a local_settings module at the end if there is one available.

    Have all your secret stuff in that local_settings.py file and add it to .gitignore so that it doesn’t go to the repository. This way, people will know that they can add their own settings to local_settings.

    For example,

    settings.py:

    DATABASE_USERNAME = 'your username here' DATABASE_PASSWORD = 'your password here' 

    local_settings.py:

    DATABASE_USERNAME = 'my top secret username' DATABASE_PASSWORD = 'my top secret password' 

    The best part is that whatever you’ve defined in settings.py will get overridden by the same name in local_settings.py.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say i have an application which has three text-fields, and i can type
Say there is some functionality needed for an application under development which could be
Say my application has a ListView that displays information from a Sqlite database, using
Say you're coding some kind of web application. Something where people can contribute content,
Say suppose 10 developers have taken 6 months to develop some application. As a
Say I have default content on the left side of my application, which is
OK, say that my application is emitting (x86) instructions into memory, making the page
Say you have an application divided into 3-tiers: GUI, business logic, and data access.
Say you are writing an application that must implement the HTTP protocol. Protocols are
Say I have a third party Application that does background work, but prints out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.