← Quiz: Git Config, .gitignore and Hooks: all 10 questions
Quiz: Git Config, .gitignore and Hooks · Question 6 of 10
A real payment key was pushed to GitHub inside .env. What must you do first?
A real payment key was pushed to GitHub inside .env. What must you do first?
- A.Add .env to .gitignore and push again
- B.Delete the repository's README
- C.Rotate (change) the key with the payment provider
- D.Rename the file to .env.old
Answer & explanation
Correct answer: Rotate (change) the key with the payment provider
The old commit and every clone still contain the key, so it must be treated as leaked.
Can you get the rest right without peeking?
Take the timed Quiz: Git Config, .gitignore and Hooks quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →