Microsoft DevOps Engineer Expert AZ-400 Practice Question

A security scan shows that an Azure Repos Git repository contains a private SSH key file named id_rsa that was committed three months ago and has since been merged into several long-lived branches and tags. You must permanently remove every copy of the file from the entire repository history, reduce the repository's size, and enable other contributors to continue working without re-introducing the file.

Which approach meets these requirements?

  • Run git filter-repo --path id_rsa --invert-paths in a fresh clone, force-push the rewritten branches and tags to Azure Repos, then instruct all contributors to re-clone or hard-reset to the updated history.

  • Delete id_rsa in the web editor of the main branch and run git gc on the remote repository.

  • Revert the commit that added id_rsa on every branch and push the new revert commits.

  • Enable a branch policy that blocks binary files, commit a change that removes id_rsa, and push without rewriting history.

Microsoft DevOps Engineer Expert AZ-400
Design and implement a source control strategy
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot