GitHub Foundations — Question 26

A single secret must be accessed by workflows in specific repositories. What is the best way to create the secret?

Answer options

Correct answer: B

Explanation

The correct answer is B because creating an organization secret with selected repository access allows for centralized management and secure sharing across specific repositories. Option A is incorrect as environment secrets are not as flexible for specific repository access. Option C does not provide the best control and management for the secret, while option D introduces unnecessary complexity by relying on an external key vault when the organization secret suffices.