Skip to main content
Version: v5.7.0

opschain git-remotes fetch

Included from Basic tier

opschain git-remotes fetch <project>/<name>

Fetches the remote now, without waiting for the periodic sweep — the same lane a webhook hint takes (opschain docs resources/git_remote, "Ref-move events"): the mirror is fetched under the remote's credential, the outcome lands on the remote (last_fetched_at, last_fetch_outcome, last_fetch_error), every watched ref that moved records info:git_remote:ref_moved — the event triggers fire on — and floating template versions whose branch moved repin. The command waits for the fetch and prints its outcome.

Requires update on the project's git remotes (the …/git_remotes rule path); an archived or disabled remote is refused as not found. The remote is resolved by name through the project's remotes index, so the positional argument is always <project>/<name>, never an id.

Output​

fetched git remote demo/origin: ok
last_fetched_at: 2026-10-01T03:20:00Z
last_ref_move_at: 2026-10-01T03:20:00Z

A failed fetch prints fetched git remote demo/origin: failed, the credential-free cause on an error: line, and exits 1. -o json|yaml prints the remote document after the fetch.

Exit codes​

CodeMeaning
0The fetch succeeded.
1The fetch failed (the cause is printed), the remote was not found or is archived/disabled, or the server refused the call.
2Usage error — malformed address, no server target.

See also​

  • opschain docs cli/git-remotes-refs — the watched refs the fetch judged.
  • opschain docs triggers ("The git ref-move source") — firing a workflow on the move a fetch records.