logout

Introduction

logout revokes your marketplace token on the server and removes it from this machine. If the server cannot be reached, the token is still removed locally, so it never stays stuck on your laptop.

splent logout
  Token revoked on the server.
  Logged out of https://marketplace.splent.io
  Removed the stored token from /workspace/.splent/credentials.json

Having nothing stored is not an error, so a script can call logout every time.


Logging out of another marketplace

splent logout --registry http://localhost:5818

Only that registry’s token is removed. The others stay.


When the token comes from the environment

  Nothing stored for https://marketplace.splent.io
  A token is coming from SPLENT_MARKETPLACE_TOKEN. Unset it to finish logging out.

The CLI does not own a token from SPLENT_MARKETPLACE_TOKEN, so it never revokes it. Until you unset the variable, the next command is still logged in.


Advanced

When the credential store is not valid JSON, or has an unexpected layout, logout resets the whole file and exits 0. That removes the token of every registry, and none can be revoked on the server. A store it cannot read, such as one written as root, is left alone and logout exits 1.


Reference

Option Description
--registry URL The marketplace to log out of. Defaults to SPLENT_MARKETPLACE_URL, then https://marketplace.splent.io
What you see What to do
Could not revoke the token on the server, removing it locally anyway. Revoke it from the marketplace by hand if it is still listed there
Could not read the credential store at <path> ... Fix the file’s permissions, or set SPLENT_CREDENTIALS to another path

See also

  • login logs in and stores the token.
  • whoami shows which token is in use.

Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es