gh secret set MY_SECRET --org myorg --visibility selected --repos myapp,myapp-api
Set an org secret for selected repositories
Creates an organization-level secret shared across repositories, with --visibility selected limiting it to the repos in --repos. Visibility choices are all, private, or selected. Org secrets ease rotation: update once, and every permitted repo sees the new value.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.