-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
2 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules/ | ||
config/production.json | ||
config/production.json | ||
config/default.json |
This file was deleted.
Oops, something went wrong.
5d04a86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you remove the secret key from showing?
I ran this : git rm --cached config/default.json and also added it to .gitignore
But still the secret info can be seen by viewing the previous commits
How do i fix that?
Please help
5d04a86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order of commits is important.
add
to your
.gitignore
file.Then add that file in git.
git add .gitignore
then commit
git commit -m 'fixing git'
Then
Then you should be ok to push to github.
5d04a86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did it in that order itself
Is it possible because i am the owner of the repository that i can see the previous commits even though i removed the cache?
5d04a86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When i click 'Load diff', I can see what was the content before and it displays my secret key and tokens.
How did you manage to get nothing shown ("" empty string ) in the mongoURI , in this commit?
5d04a86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes if you've committed and pushed those files in the past, they will show in your history.
5d04a86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you go back far enough in the history of this repo, you will see Brad's credentials.
Here for example
5d04a86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So there is nothing else i can do now to hide my credentials?
5d04a86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making my repo private would be the best solution now, isn't it?
5d04a86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could reset you repository to a commit prior to adding the config files.
Or make your repository private.
Or create a new repository and remove the old one.
Or not worry about it and create a new database that you don't push the config for.
5d04a86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, Thank you Will !