login

Table of contents

  1. Introduction
  2. Logging in to a local marketplace
  3. Logging in from CI
  4. Where the token is stored
  5. Advanced
  6. Reference
    1. Options
    2. Errors
  7. See also

Introduction

login logs you in to the SPLENT marketplace and keeps the token on this machine, the way docker login does. You need it only to publish SPL models with spl:publish.

splent login
  Logging in to https://marketplace.splent.io

  E-mail: dev@example.com
  Password:

  Logged in to https://marketplace.splent.io
  Identity   dev@example.com
  Scopes     read_spl, write_spl
  Token      splent-cli@laptop
  Expires    2026-10-26T10:00:00+00:00 (in 90 days)
  Stored in  /workspace/.splent/credentials.json (mode 0600)

Your e-mail and password become a token that lasts 90 days. It is checked with the marketplace before it is stored, so a token that does not work is never kept.


Logging in to a local marketplace

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

A local marketplace answers at http://splent_marketplace_app_web:5000 from inside splent_cli_container and at http://localhost:5818 from the host. Each registry keeps its own token.


Logging in from CI

echo "$SPLENT_MARKETPLACE_TOKEN" | splent login --token-stdin

--token-stdin reads a token you already have instead of asking for a password. There is no --token option, because a secret on the command line ends up in the shell history. You can also skip login and set SPLENT_MARKETPLACE_TOKEN, which always wins over a stored token.


Where the token is stored

Order Path
1 SPLENT_CREDENTIALS, when set. A relative path is resolved against the current directory
2 <WORKING_DIR>/.splent/credentials.json, when the workspace is visible
3 ~/.splent/credentials.json, for a CLI installed from PyPI outside a workspace

It lives in the workspace because the container’s home is emptied on every rebuild. The file has mode 0600 and one entry per registry, and the token is never printed or logged. Its folder gets mode 0700 and a .gitignore, unless SPLENT_CREDENTIALS points into a folder that already existed.


Advanced

A URL without a scheme gets https, except localhost, an IP address or a Docker service name with no dot, which get http. Trailing slashes and default ports are dropped, so https://marketplace.splent.io/ and https://marketplace.splent.io are one registry.

When login cannot check or store a token it just created, it revokes it on the server. A token passed with --token-stdin is never revoked.


Reference

Options

Option Description
--registry URL The marketplace. Defaults to SPLENT_MARKETPLACE_URL, then https://marketplace.splent.io
--token-stdin Read an existing token from stdin instead of asking for e-mail and password
--name LABEL The new token’s label on the server. Defaults to splent-cli@<hostname>

Errors

It exits 1, storing nothing, on any of these.

Message What to do
The marketplace rejected that e-mail and password. Check the e-mail, or reset the password on the marketplace
Your marketplace account is not active yet. Ask an administrator to activate it
The marketplace is rate limiting this client. Wait the time it prints
Could not reach the marketplace at <url>. Check that it runs, and use the container or host URL as fits
The marketplace has nothing at that address (<url>). The URL is not a SPLENT marketplace, or the server is older than the CLI
No token arrived on stdin. or ... not a single value. Pipe only the token in, as in Logging in from CI
The marketplace URL ... Pass a full http or https URL with --registry

See also

  • whoami shows who you are and which token is in use.
  • logout revokes the token and removes it.

Back to top

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