Interview Prep/GitHub Actions/Permissions, Tokens & Secrets

An org secret is visible to the repo in Settings but empty in a private repo's workflow.

IntermediateTroubleshootingPermissions, Tokens & Secrets
Answer

Likely causes → The org secret's visibility is "Private repositories" but the repo is internal, or "Selected repositories" no longer includes it; or the plan does not allow org secrets for private repos.

Diagnose →

gh api orgs/devopsshack/actions/secrets/NEXUS_TOKEN --jq .visibility
gh api orgs/devopsshack/actions/secrets/NEXUS_TOKEN/repositories --jq '.repositories[].name'

Fix → Add the repo to selected repos or change visibility.

Prevent → Manage org secrets with Terraform (github_actions_organization_secret) so access is reviewed.

All GitHub Actions questions Roadmap: GitHub Actions

More on Permissions, Tokens & Secrets