Google Cloud Certified Associate Cloud Engineer Practice

Disable ads (and more) with a membership for a one time $2.99 payment

Prepare for the Google Cloud Certified Associate Cloud Engineer Exam with flashcards and multiple choice questions. Each question includes hints and explanations to help you study effectively. Get ready to pass your certification exam!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


While looking at your application's source code in your private Github repo, you've noticed that a service account key has been committed to git. What steps should you take next?

  1. Revoke the key, remove the key from Git, purge the Git history to remove all traces of the file, ensure the key is added to the .gitignore file.

  2. Delete the project and create a new one.

  3. Do nothing. Git is fine for keys if the repo is private.

  4. Contact Google Cloud Support

The correct answer is: Revoke the key, remove the key from Git, purge the Git history to remove all traces of the file, ensure the key is added to the .gitignore file.

The appropriate action to take when a service account key has been inadvertently committed to a private GitHub repository involves several important steps to ensure security. Revoke the key immediately to prevent any unauthorized access to resources until the situation is addressed. This is crucial because once the key is in your repository, it could potentially be exposed even if the repository is private, especially if the key is shared or the repository's privacy settings are changed in the future. After revocation, the next step is to remove the key from the Git history. Even if you delete the file in the latest commit, Git retains the commit history, which means the key could still be accessible in earlier commits. Purging the Git history ensures that there are absolutely no traces of the key left in the repository. Lastly, adding the key to the .gitignore file prevents this issue from happening again in the future by ensuring that the key is not tracked by Git, thus preventing accidental commits. In contrast, deleting the project and creating a new one is not a practical solution as it involves unnecessary overhead and exercises a lack of control over addressing the immediate security issue. Doing nothing is dangerous, as relying on the privacy of the repository does not guarantee the safety of sensitive information. Contacting Google Cloud