← Quiz: Git Basics: all 10 questions
Quiz: Git Basics · Question 10 of 10
A teammate pushed a .env file with an API key to GitHub. What must happen?
A teammate pushed a .env file with an API key to GitHub. What must happen?
- A.Nothing, if the repository is private
- B.Delete the file in the next commit and continue
- C.Treat the key as leaked and rotate it immediately, then stop tracking the file
- D.Rename the file to .env.old
Answer & explanation
Correct answer: Treat the key as leaked and rotate it immediately, then stop tracking the file
Once pushed, the secret is in the history and possibly in clones.
Can you get the rest right without peeking?
Take the timed Quiz: Git Basics quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →