opschain git-credentials delete
Included from Basic tier
opschain git-credentials delete <id|name> [--project <code>] --confirm
Deletes a shared git credential. Deleting is permanent, so without
--confirm the command only previews — it reads the credential and prints
what would be deleted, exiting 0 without touching anything.
The server refuses while any Git remote still references the
credential, and the refusal names the referencing remotes
(Git credential is in use by Git remotes (<project>/<remote>, …), it cannot be deleted.) — repoint those remotes first (opschain git-remotes update with a different reference, or an empty reference alongside
replacement inline credentials; opschain docs cli/git-remotes-update).
The credential is addressed by id or by its name within the scope
(--project <code>, or the global registry without it); a delete only
reaches the scope's own credentials.
Flags
| Flag | Meaning |
|---|---|
--project <code> | The project whose registry holds the credential. Omit for the global registry. |
--confirm | Actually delete. Without it the command previews. |
Output
The preview (no --confirm):
would delete git credential github-ci (https_basic, acme scope, 0199c8…)
deleting is permanent; the server refuses while a git remote still references the credential
re-run with --confirm to delete
A delete prints deleted git credential <id|name>.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Deleted, or previewed. |
| 1 | The credential was not found in the scope, or the server refused the delete (still referenced). |
| 2 | Usage error — no server target. |
See also
opschain docs cli/git-remotes-update— move a remote off the credential first.opschain docs cli/git-credentials-list— find the credential's id.