GH-ATTESTATION-TRUSTED-ROOT(1)

πŸŽ€ GH-ATTESTATION-TRUSTED-ROOT(1) πŸŽ€

okay bestie, so this is a page straight out of the GitHub CLI manual β€” yes, that GitHub CLI, the gh you already know and love πŸ’… β€” and it's all about one very specific, very iconic little subcommand. Sit down, hydrate, let's get into it ✨


πŸ’– NAME πŸ’–

gh-attestation-trusted-root β€” it outputs the contents of a trusted_root.jsonl file, and the whole point is lowkey that you can do offline verification with it 🫢


✨ SYNOPSIS ✨

gh attestation trusted-root [--tuf-url <url> --tuf-root <file-path>]
[--verify-only] [flags]

that's the whole shape of it, no cap 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

So what does it actually do? It outputs the contents for a trusted_root.jsonl file, and yeah, the most likely reason you'd want that is offline verification πŸ’–

Here's the tea β˜•: when you're using gh attestation verify and your machine is on the internet, this whole thing happens automatically β€” no effort required, slay. But if you need to do offline verification, you have to supply a trusted root file yourself via --custom-trusted-root. That's literally the exact situation this command exists for β€” it helps you fetch a trusted_root.jsonl file for that purpose πŸŽ€

And the best part? You can call this command with zero flags and get a trusted root file that covers the Sigstore Public Good Instance as well as GitHub's Sigstore instance. Two for the price of none, we love to see it πŸ‘‘

Otherwise β€” like if you're feeling custom β€” you can use --tuf-url to specify the URL of a custom TUF repository mirror, and --tuf-root should be the path to the root.json file that you securely obtained out-of-band πŸ” (yes, securely, out-of-band, don't be out here being casual with your root.json, bestie, that's main character security energy fr fr)

and if you just want to verify the integrity of your local TUF repository, and you genuinely do not want the contents of a trusted_root.jsonl file? that's exactly what --verify-only is for 🧚

🌈 OPTIONS 🌈

  • --hostname <string> β€” configure the host to use πŸ–₯️
  • --tuf-root <string> β€” the path to the root.json file for TUF, on disk πŸ’Ύ
  • --tuf-url <string> β€” the URL to the TUF repository mirror πŸ”—
  • --verify-only β€” don't output trusted_root.jsonl contents, just verify-only vibes πŸ™ˆ

⭐ EXIT CODES ⭐

the vibe check results, if you will:

  • 0 β€” successful execution, we ate πŸ’…
  • 1 β€” error 😭
  • 2 β€” command canceled πŸ’€
  • 4 β€” authentication required πŸ”‘
NOTE: specific commands may have additional exit codes. Refer to the command's help for more information πŸ‘€

πŸ”₯ EXAMPLE πŸ”₯

# Get a trusted_root.jsonl for both Sigstore Public Good and GitHub's instance
$ gh attestation trusted-root

look at her go, not a single flag in sight 🌟


πŸ’œ SEE ALSO πŸ’œ


and that's the whole page, bestie!! mwah 🫢 this gem is from GitHub CLI v2.102.0, dated Oct 2026 β€” iconic behavior honestly, periodt πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from