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 5940947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:02:25+00:00 2026-05-22T16:02:25+00:00

Some of my programs require some confidential data (authentication mainly) to work properly. I

  • 0

Some of my programs require some confidential data (authentication mainly) to work properly.
I often put my own credentials in the main() of the sourcecode when developing and testing to see if my code works, and remove them when all is OK. However, it’s easy to forget removing them.

What is a good approach to prevent these confidential data from ending up in a version control commit?

I use Mercurial (and Python).

I’ve been thinking of:

  • automatic running some sensitive-data checking script on commit, which aborts if it finds some specific strings (doesn’t seem fool proof, requires maintaining the sensitive strings)
  • storing the confidential data somewhere else (where?, how to practically import/use them?).
  • using a testing branch (but doesn’t really solve the problem)
  • providing the confidential data as command line arguments (too unpractical)
  • 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. Editorial Team
    Editorial Team
    2026-05-22T16:02:26+00:00Added an answer on May 22, 2026 at 4:02 pm

    Put things like authentication data in a config file, then add that config file to the set of ignored files in your VCS (in Mercurial, that’s .hgignore).

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

Sidebar

Related Questions

I have two C# programs and I want to send some data back and
When I require certain gems, some of them work and some of them don't
I'm working on a Google App Engine program that will require some basic spell
How do some programs edit whats being displayed on the terminal (to pick a
I have been trying some programs in the C Language and come across to
I'm a little confused as to what's going on, i'm playing with some programs
For some small programs in Python, I would like to set, store and retrieve
We have some COBOL programs in our financial applications which need to interact with
My program uses some external programs that i included in the Files folder. In
I need to write some Prolog programs for a class. Any recommendations?

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.