nerdexam
GitHub

GITHUB-ACTIONS · Question #21

Your organization is managing secrets using GitHub encrypted secrets, including a secret named SuperSecret. As a developer, you need to create a version of that secret that contains a different value

The correct answer is B. Create MyRepo_SuperSecret in GitHub encrypted secrets to specify the scope to MyRepo.. To scope a secret to a specific repository, you can create a new secret with a name like MyRepo_SuperSecret in the secrets section of the MyRepo repository's settings. This ensures that the secret is specific to that repository and can be used within its workflows.

Manage encrypted secrets

Question

Your organization is managing secrets using GitHub encrypted secrets, including a secret named SuperSecret. As a developer, you need to create a version of that secret that contains a different value for use in a workflow that is scoped to a specific repository named MyRepo. How should you store the secret to access your specific version within your workflow?

Options

  • ACreate a duplicate entry for SuperSecret in the encrypted secret store and specify MyRepo as the
  • BCreate MyRepo_SuperSecret in GitHub encrypted secrets to specify the scope to MyRepo.
  • CCreate a file with the SuperSecret. information in the .qithub/secrets folder in MyRepo.
  • DCreate and access SuperSecret from the secrets store in MyRepo.

How the community answered

(60 responses)
  • A
    13% (8)
  • B
    77% (46)
  • C
    3% (2)
  • D
    7% (4)

Explanation

To scope a secret to a specific repository, you can create a new secret with a name like MyRepo_SuperSecret in the secrets section of the MyRepo repository's settings. This ensures that the secret is specific to that repository and can be used within its workflows.

Topics

#encrypted secrets#secret scoping#repository secrets#secret precedence

Community Discussion

No community discussion yet for this question.

Full GITHUB-ACTIONS Practice