UTDNebula / skedge

MIT License
8 stars 7 forks source link

[Internal] Remove API key from git history #60

Open TyHil opened 5 months ago

TyHil commented 5 months ago

Skedge now makes calls to the nebula API via Trends. This means we no longer have the obfuscated API key in the code. However, it still exists in the repositories history.

We can run a command to replace all instances of the obfuscated key with a generic string and then force push to the repository. This will unfortunately make pulling and running a past version of skedge not work.

The command I found to rewrite git history from here is: git filter-branch --tree-filter "sed -i 's/EM~eW}G<}4qx41fp{H=I]OZ5MF6T:1x{<GF:~v</API_KEY/' src\data\config.ts" --all. I've done this in my own repository and it worked.

TyHil commented 5 months ago

@iamwood can I get your opinion on this?