Skip to main content
Version: v5.6.1

opschain security git-policies put

Included from Basic tier

Creates a git identity policy entry, or replaces one (--id). Replacing a seeded entry clears its seeded marker — the entry has been reviewed.

opschain security git-policies put --project web --remote app \
--rev main --rev 'release/*' --group deployers --default \
--description "the app team's lane"
Created git identity policy 019a...: remote app on web

The caller must administer the entry's scope: a global entry needs the global security administrator (or a superuser); a project entry its project's security administrator. On a replace that moves an entry between scopes, both the old and the new scope must be manageable. The write is audited (api:git_remote_policies:create / update) and applies on the next authorisation decision.

With no --rev the entry allows every rev; with neither --user nor --group it covers anyone with path rights on the target. --default makes the remote the explicit git-identity default for the scope: a change step that names no remote resolves to it (defaults are policy-entry properties, never node settings).

Flags​

FlagMeaning
--id <id>Entry id to replace (empty creates a new entry).
--project <code>Project code the entry scopes to (empty: a global entry).
--remote <name>Configured git remote name the entry allows (required).
--rev <glob>Allowed rev glob, repeatable (* any sequence, ? one character; default: all revs).
--user <id-or-username>Covered user, repeatable. A username held by accounts of more than one provider refuses by name — pass the user id.
--group <name>Covered group name, repeatable.
--defaultMark the remote as the explicit git-identity default for this scope.
--description <text>Entry description.
--server <url>Server base URL (default: the active context / OPSCHAIN_SERVER).
--auth-token <token>Bearer token override (default: your opschain login session, then $OPSCHAIN_ADMIN_TOKEN, then the token stored by opschain admin login).

See also​

  • opschain docs cli/security-git-policies-list
  • opschain docs cli/security-git-policies-delete