SwarmOps
ReferenceCommandsswarmops auth logout

Page kind: Reference

swarmops auth logout#

Describes v0.13.0Last changed View as Markdown

Remove a provider's login from your login file.

The token is forgotten here and not revoked at the provider: revoke it there if it may have leaked. Removing a login the file does not hold succeeds (removed is false).

Metadata
Group
auth
Since
0.12.0
Mutates
no
Identity required
no
MCP tool
none
Envelope op
auth_logout
Exit codes
02

Syntax#

Syntax
swarmops auth logout [OPTIONS] <--gh>

Required arguments#

Exactly one of --gh is required.

Syntax: --gh.

Log out of GitHub (github.com).

Optional arguments#

The command also takes the global options.

Examples#

Shell
SWARMOPS_AUTH_FILE=[tmp]/state/swarmops/auth.toml swarmops auth logout --gh
Output
{ "ok": true, "op": "auth_logout", "api": 1, "result": { "provider": "gh", "host": "github.com", "removed": true,
Show 8 more lines "file": "[tmp]/state/swarmops/auth.toml" }, "meta": { "elapsed_ms": "[elapsed_ms]", "resolved": {}, "auth": "trust" } }

Exit code 0. Recorded by the CLI tests. A name in square brackets, such as [tmp] or [c1], stands for what differs from run to run: the test's temporary directory, an id, a time.

Return information#

result is a AuthLogout (swarmops schema AuthLogout prints its JSON Schema).

FieldTypeRequiredDescription
filestring or nullnoThe login file, a path on the caller's host. Omitted on a host that names no directory for it.
hoststringyesThe host the login was for.
providerstringyesThe provider logged out of.
removedbooleanyesWhether the file held the login; false when there was none to remove.

Envelope op: auth_logout.

Exit codes:

  • 0: Success.
  • 2: The request or the command line is malformed.

Errors#

  • E_INVALID_ARG (exit 2): A malformed argument or request, including a command-line usage error.

Any command that opens a store may also fail with a store error, such as E_NOT_A_REPO, E_IO or E_STORE_CORRUPT; a command line the grammar refuses is E_INVALID_ARG (exit 2).

See also#

On this page