teebagz
teebagz

Reputation: 724

Git security - private information in previous commits

I'm working on a project mainly for a bit of fun.

I set up a twitter account and wrote a python script to write tweets.

Initially i hard-coded the twitter credentials for my app into my script (tweet.py)

Now i want to share the project so i have removed my app's credentials from tweet.py and added them to a config file. I have added the config file to .gitignore.

My question is, if someone forks my project, can they somehow checkout an old version of tweet.py which has the credentials? If so, what steps can i take to cover myself in this case?

Upvotes: 0

Views: 94

Answers (2)

Nabarun Dey
Nabarun Dey

Reputation: 114

Yes, anyone can see the old files in version history in git-hub free version. If you want to make your project secure, you have to pay for private repository in github.

If you dont wana pay, follow what @Stijin suggested.

Upvotes: 1

Stijn Diependaele
Stijn Diependaele

Reputation: 588

They can checkout an older version and check your credentials.

Two options I can immediately think of:

  1. Make your last version the only commit in the history

  2. Less optimal: Change your credentials

There is also an entire page about this on github: Remove sensitive data

Upvotes: 2

Related Questions