When you push .env to Git #developermemes #softwareengineer #coding

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Pushing .env to git is the equivalent of a celebrity having a wardrobe malfunction

skysorcerer
Автор

For the beginners who didn't understand it. He made a big mistake sharing his API key in a repository which is public and can be accessed and used by anyone, leading to increased billing. Please correct me if i'm wrong.

adityag
Автор

and here I was expecting a short on how to remove commits xDDD

navi
Автор

Git reset soft -> edit gitignore ->git commit -> git push force

lordvaders
Автор

Make a .example.env with dummy information, then after you git clone the repo copy the .example.env to the actual .env and fill the actual information. Then add the .env in your .gitignore so that it doesn't get commited in commits at later time. I hope this help.

manosmakris
Автор

deleting repository is the best choice 😂

learning_trespasser
Автор

Depends, sometimes you can just cycle keys before anything bad happens.

jon
Автор

I pushed node modules yesterday and it made me feel dumb first time in 2 yrs of coding.

nascentone
Автор

We use a keyvault and the developer simply has to run az login, thats it, no chance of a apikey leak, unless they write those keyvault response to a file and commit it.

antonyjr.devlogs
Автор

Yeah but have you ever run a sql update without a where clause. In 20 years I've done it twice

matthewtalbot-paine
Автор

If you have any repo forks, you must delete all of them to remove the api key commit

escape-from-scrum
Автор

Man after fumbling like that, I'm doing leetcode questions to prep for my McDonalds interview

themanydrippedgod
Автор

I did push the .env file onec and bcz of that we had to overhaul all the stuff😂

darnaram
Автор

If someone forks that repo, that API key is on the internet forever lol

solidwaterslayer
Автор

Hmmm I use a small little tool named "git blame" and the magic thing about git is unless you actually overwrite the git history it's still there

SXsoft
Автор

Deleting a repo doesn't make it disappear forever...

nazobanaguska
Автор

Deleting a repo or privating it doesn't do jack squat on GitHub. If someone made a fork or is able to get the commit SHA from e.g. CI logs, you're toast.

Rotate the API key first, then add a comment to the file, that this key is an example and should be replaced. You gonna annoy people who scan for them and ensure that your repo gets ignored in future scan results, if you fat finger this again.

__mrmino__
Автор

Don't store your api keys in the same directory as your project.

-na-nomad
Автор

Git rm file, add the file to git ignore, push only git ignore file👍

ApexPlayground_divine
Автор

I was publishing my first personal project to my github and literally just left an API key in my code as a variable

dominicvinciulla
join shbcf.ru