'Git detects ODBC Connection String exposed within my GitHub repository
I have already pushed my code to the master branch to the Git repo. But I forgot to secure of my connection database server setting.
In detail, I commited and pushed entirely local appsettings.json file that include ODBC connection string, secret keys, password of server.
I knew it is one of the most mistake of developers. But I worked hard to finish another piece of code, then cannot handle the whole problem.
According my research, Git was structured as worktree and each commit is a snapshot of the whole repo, so if I fix my mistake on locally code and push again, the problem cannot be solved the secret leak. Because Git saved my secret key & password on history. So I really need your help!
How can I solve the problem without modifiied actions to repository (delete entire repo and create new one)
And how to set up Git to against secured files when I just need to remove secret character strings and password on each commit?
I am using .NetCore and EntityFrameWork to build a web api on visual studio*.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
