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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:00:11+00:00 2026-05-20T04:00:11+00:00

Are there any tools you use to scrub your project before pushing to a

  • 0

Are there any tools you use to scrub your project before pushing to a public github repo. How do you maintain your private settings, while pushing your source code to a public repo? What is the best practice?

  • 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-20T04:00:11+00:00Added an answer on May 20, 2026 at 4:00 am

    I don’t keep database.yml in git. I write it in a cap setup task. For email addresses and other things, I read them at app initialize from a file in the file-system. Again, not under source code management and written to the shared directory during cap setup.

    Here’s a sample:

    namespace :deploy do
      task :start do ; end
      task :stop do ; end
    
      task :setup do
        run <<-CMD
          mkdir -p -m 775 #{release_path} #{shared_path}/system #{shared_path}/media &&
          mkdir -p -m 777 #{shared_path}/log &&
          mkdir -p -m 777 #{shared_path}/pids &&
          mkdir -p #{deploy_to}/#{shared_dir}/config
        CMD
    
      end
    
      require 'erb'
    
      after deploy:setup do
        db_config = ERB.new <<-EOF
    production:
      adapter: mysql2
      database: my_fine_database
      host: 127.0.0.1
      username: database_user
      password: database_password
    EOF
    
        email_config = ERB.new <<-EOF
    --- 
    :user_name: me@mydomain.com
    :password: verysecret
    :port: 25
    :address: mydomain.com
    :domain: mydomain.com
    :authentication: :login
    EOF
    
        put db_config.result, "#{shared_path}/config/database.yml"
        put email_config.result, "#{shared_path}/config/creds.yml"
      end
    

    and in my environment.rb, I put:

    credentials = File.join(Rails.root, 'config/creds.yml')
    
    ActionMailer::Base.smtp_settings = YAML.load(File.open(credentials)) if File.exists?(credentials)
    

    What other sensitive information might you be storing?

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

Sidebar

Related Questions

Any suggestions? Using visual studio in C#. Are there any specific tools to use
Is there any magic tools i can use to scan source code that was
Is there any tools using which I can use to create Windows forms from
Are there any free tools that I can use to convert a PDF document
Is there any way to use common tools (ffmpeg? mplayer/mencoder? mkvmerge? etc ) to
Is there any tools for GUI Test Automation for Internet Explorer? I already use
Are there any tools I can use so that if someone clicks on a
Are there any tools that I can use to migrate my Oracle database to
Are there any tools that could analyze code and suggest rewrites that use Linq?
Are there any tools that can be used to design Android UI's (like the

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.