gko login signs you in to one install and remembers it:
gko login example.org
It opens your browser at the install's identity provider, where you sign in
with your password and second factor. The browser answers a listener on this
machine's loopback, and the CLI trades that answer for an API token. The CLI
holds no client secret; PKCE binds the sign-in to the process that asked for
it. If the browser does not open, gko login prints the address to visit.
The token expires after 90 days. It is kept, with the install's name, in
~/.config/gko/config.json, readable only by you. GKO_CONFIG puts that file
elsewhere.
The last install you logged in to is the one a bare command talks to. Logging in to another install makes it current, and logging in again to one you already have replaces its token.
gko logout revokes this machine's token on the install and forgets it. It
does not revoke other tokens you made, and it does not sign you out of the
portal in a browser.
For CI, a provisioner or a server, GKO_HOST and GKO_TOKEN, set together,
stand in for the config file entirely:
export GKO_HOST=example.org
export GKO_TOKEN=<token>
gko app list
Create the token in the portal, or with gko token create, on a machine that
is already signed in. A token is printed only once, and it acts as the person
who created it, with the rights they hold when each request is made.
The operator can add -project <project>, or GKO_PROJECT=<project>, to
manage another project. Only the install's operator may, and the request can
manage that project and no more, so every project rule still holds.
gko whoami # your username, address and project
gko settings # the portal, the app domain, the project, and (as operator) every project
On every install, settings prints the portal and the app domain. The
operator's output also lists every other project with its domain and memory share.
gko version adds the platform version the install is running.
Sudo mode does not apply to gko: the browser sign-in already gave the
password and the second factor that the portal asks for again before a
destructive change.
Last validated: · View as Markdown