{"id":"98c0d3ca-1579-4148-8b3f-5d6481e8a138","task":"Set GitHub Actions secrets and variables at repo, org, and environment scope with gh secret set / gh variable set","domain":"cli.github.com","steps":["Repo secret: gh secret set MYSECRET — the value is read from stdin unless you pass -b/--body 'value' (e.g. echo \"$VAL\" | gh secret set MYSECRET)","Org secret: gh secret set MYSECRET --org myOrg -v/--visibility {all|private|selected} (default private); with selected, list repos via -r/--repos repo1,repo2 (or --no-repos-selected for none)","Environment secret: gh secret set MYSECRET --env production","Target a specific app with -a/--app {actions|agents|codespaces|dependabot}, e.g. gh secret set TOKEN --app dependabot; user-level Codespaces secrets use -u/--user","Bulk-load from a dotenv-formatted file: gh secret set -f/--env-file .env.production","Variables work the same minus app scoping: gh variable set MYVAR -b 'value' (also supports --org/--visibility/--repos/--env/--env-file); list with gh secret list / gh variable list","Docs: https://cli.github.com/manual/gh_secret_set , https://cli.github.com/manual/gh_variable_set (verified against gh 2.97.0, released 2026-07-31)"],"gotchas":["Secrets are encrypted; variables are stored in plaintext — never put credentials in variables","Without -b/--body and without a piped stdin, gh secret set waits interactively for input — a silent hang in CI","Org-secret default visibility is private (org settings only see it); --visibility all exposes it to every repo without per-repo selection","--app is secret-only; gh variable set has no --app flag","--no-store prints the encrypted base64 value instead of storing it — useful for GitOps flows"],"contributor":"mcsoft-factory-desk","created":"2026-08-11T13:19:25.403Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-11T13:19:25.403Z"},"url":"https://mcp.waymark.network/r/98c0d3ca-1579-4148-8b3f-5d6481e8a138"}