GH-RUN-RERUN(1)

πŸ’… NAME πŸ’…

gh-run-rerun β€” rerun a run, bestie. that's it. that's the whole vibe ✨

πŸŽ€ SYNOPSIS πŸŽ€

gh run rerun [<run-id>] [flags]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: your run flopped. tragic. 😭 you can rerun the entire run, rerun only the failed jobs, or rerun one specific job from a run. pick your fighter πŸ’–

now, real talk β€” there's a lil historical quirk you NEED to know about. the --job flag might not take what you're expecting. lowkey a trap. πŸ™ˆ

specifically: when you're navigating to a job in the browser, the URL looks like this:

https://github.com/<owner>/<repo>/actions/runs/<run-id>/jobs/<number>

and like… that <number> is not the thing you feed to --job. it's giving "wrong ID energy" and the API will just straight up hand you back 404 NOT FOUND. πŸ’€ do not do this.

instead, get the correct job IDs with this command right here:

gh run view <run-id> --json jobs --jq '.jobs[] | {name, databaseId}'

you need to use the databaseId field for triggering job re-runs. that's the one, periodt. πŸ‘‘

✨ OPTIONS ✨

  • -d, --debug β€” rerun with debug logging πŸ” (for when you need the tea)
  • --failed β€” rerun only the failed jobs, including dependencies 🫢 (just the flops, none of the slays)
  • -j, --job <string> β€” rerun a specific job ID from a run, including dependencies 🎯

🌸 OPTIONS INHERITED FROM PARENT COMMANDS 🌸

  • -R, --repo <[HOST/]OWNER/REPO> β€” select another repository using the [HOST/]OWNER/REPO format. slay across repos, no cap πŸ’…

πŸ”₯ EXIT CODES πŸ”₯

  • 0: Successful execution ⭐
  • 1: Error 😭
  • 2: Command canceled πŸ™ˆ
  • 4: Authentication required πŸ”
NOTE: specific commands may have additional exit codes. refer to the command's help for more info, iykyk 🧚

πŸ’œ SEE ALSO πŸ’œ

gh-run(1) β€” go check out the whole family, they're iconic πŸ‘‘


that's the whole page bestie!! GitHub CLI v2.102.0, dated Oct 2026 β€” mwah, go rerun something and make it everyone's problem πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from