Access
Install the kloudlite CLI, sign in, and manage the logins and credentials of your account.
Last updated
On this page
Description and operation
General
You sign in to the console in a browser. The kloudlite CLI signs in with a device code that you approve in the console. The SDKs use the CLI login of the computer they run on.
Your handle identifies your account in every address, for example alice/api for a repository. You choose it after the first sign-in.
| Credential | Used for | Lifetime |
|---|---|---|
| Console session | The console. | 12 hours. |
| CLI login | kloudlite, the SDKs and the /v1 API. One for each computer. | 30 days, or until revoked. |
| API token | Git over HTTPS and the container registry, for one owner. | Until revoked. |
| SSH key | Git over SSH. | Until removed. |
| Signing key | Verified commits. It gives no access. | Until removed. |
Sign-in methods
| Method | Note |
|---|---|
| Email link | The link works once and expires after 15 minutes. |
| Passkey | Add it in Profile settings after the first sign-in. |
| GitHub or Google | Shown when the provider is enabled. |
A handle has 3 to 39 characters: lowercase letters, digits and -, with no - at the start or end. Accounts and teams share one set of handles.
Install
The install script puts kloudlite and kl-tui in ~/.local/bin and verifies each file against the release checksum. It supports macOS and Linux on x86_64 and arm64, and needs no administrator rights. kl-tui is not available on Linux arm64.
| Variable | Default | Meaning |
|---|---|---|
BIN_DIR | ~/.local/bin | The install directory. |
KL_CONNECT_VERSION | Newest release | A release tag, for example kloudlite-v0.1.0. |
Tasks
Install kloudlite
Reason for the task: Install the CLI on your computer.
Job set-up
- Access: you.
- References:
kloudlite.
Procedure
Run the install script.
curl -fsSL https://dev.kloudlite.io/install.sh | shIf the script prints
Add it to your PATH, run theexportline it shows and add it to your shell profile.
Close-out
- Run
kloudlite --version. It prints the version.
Sign in with kloudlite
Reason for the task: Give the CLI and the SDKs a login for your account.
Job set-up
- Access: you. Only you can approve the code.
- References:
kloudlite login.
Procedure
Run the login command. It opens the approval page in your browser.
kloudlite loginMake sure that the page shows the name of your computer, then select Approve.
Close-out
- Make sure that the command prints
Logged in asand your handle.
Sign out of kloudlite
Reason for the task: Remove the login from a computer.
Job set-up
- Access: you.
- References:
kloudlite logout.
Procedure
Run the logout command. It revokes the login and deletes
~/.config/kloudlite/config.json.kloudlite logout
Close-out
- Make sure that the command prints
Logged out.
Revoke a CLI login
Reason for the task: End the login of a computer that you no longer use.
Job set-up
- Access: you.
- References:
GET /v1/cli/tokens,DELETE /v1/cli/tokens/{id}.
A revoked login stops at once. That computer must sign in again.
Procedure
Show your CLI logins. The
nameis the computer.from kloudlite import Kloudlitekl = Kloudlite()for t in kl.request("GET", "/v1/cli/tokens"): print(t["id"], t["name"], t["expiresAt"])import { Kloudlite } from "./index.ts";const kl = new Kloudlite();const tokens = (await kl.request("GET", "/v1/cli/tokens")) as { id: string; name: string; expiresAt: string }[];for (const t of tokens) console.log(t.id, t.name, t.expiresAt);kl := kloudlite.New(kloudlite.Options{})var tokens []map[string]anyif err := kl.Request("GET", "/v1/cli/tokens", kloudlite.RequestOptions{Out: &tokens}); err != nil { log.Fatal(err)}for _, t := range tokens { fmt.Println(t["id"], t["name"], t["expiresAt"])}require_relative "kloudlite"kl = Kloudlite::Client.newkl.request("GET", "/v1/cli/tokens").each { |t| puts [t["id"], t["name"], t["expiresAt"]].join(" ") }var kl = new Kloudlite();System.out.println(kl.request("GET", "/v1/cli/tokens"));kloudlite request GET /v1/cli/tokensDelete the login. Replace
IDwith itsid.kl.request("DELETE", "/v1/cli/tokens/ID")await kl.request("DELETE", "/v1/cli/tokens/ID");if err := kl.Request("DELETE", "/v1/cli/tokens/ID", kloudlite.RequestOptions{}); err != nil { log.Fatal(err)}kl.request("DELETE", "/v1/cli/tokens/ID")kl.request("DELETE", "/v1/cli/tokens/ID");kloudlite request DELETE /v1/cli/tokens/ID
Close-out
- Show the logins again. Make sure that the
idis gone.
Troubleshooting
| Symptom | Possible cause | Corrective action |
|---|---|---|
unsupported OS or unsupported architecture | The computer is not macOS or Linux on x86_64 or arm64. | Use a supported computer. |
could not find the latest release | The script cannot reach GitHub. | Check the network and run the script again. |
checksum mismatch | The download is incomplete or changed. | Run the script again. |
kloudlite: command not found | The install directory is not in PATH. | Run the export line that the script printed. |
timed out waiting for approval | The code was not approved within 10 minutes. | Run kloudlite login again. |
that login expired or was denied | The code expired or was already used. | Run kloudlite login again. |
pick a handle before signing in from the CLI | The account has no handle. | Sign in to the console, choose a handle, then run kloudlite login. |
429 from kloudlite login | More than 20 codes from your network in 10 minutes. | Wait 10 minutes. |
not logged in or your login has expired | The computer has no valid CLI login. | Run kloudlite login. |
401 with this CLI login was revoked | The login was revoked. | Run kloudlite login. |
That sign-in link is no longer valid | The link was used or is older than 15 minutes. | Request a new link. |