sharataka
sharataka

Reputation: 5132

How to prevent personal info to be shown in public repo on github?

I have a rails app that I am deploying with heroku. I am also using github. In my app, I have a file (below) that I believe is needed in order for mail to be sent. However this file contains my personal email address and my github repo is public. Is there a way my web app can still use this information but not have it appear in my public repo on github?

ActionMailer::Base.smtp_settings = {
  :address              => "smtp.gmail.com",
  :port                 => 587,
  :domain               => "gmail.com",
  :user_name            => "email",
  :password             => "password",
  :authentication       => "plain",
  :enable_starttls_auto => true
}

Upvotes: 1

Views: 72

Answers (1)

Guillaume Darmont
Guillaume Darmont

Reputation: 5018

You just can't. Every file pushed on a Github public repo will be readable. As I understand, using .gitignore won't solve your problem if you need to deploy the config file on heroku using Git.

You can try Atlassian Bitbucket if you need free private repositories.

Upvotes: 5

Related Questions