Sign In & Login
Clonit Cloud is an optional extension that adds team collaboration, cross-device
snapshot access, and sharing. Before you can use any cloud feature, you sign in
with clonit login — a browser-based login that needs no password and no API
key typed into your terminal.
How sign-in works
Section titled “How sign-in works”clonit login runs an OAuth 2.0 Device Authorization Grant (RFC 8628)
against the central auth service. The flow is designed for command-line tools:
- Clonit asks the auth service for a short, one-time user code and a verification URL.
- Clonit prints the code and URL, and (unless you pass
--no-browser) opens the URL in your browser. - You sign in and approve the request in the browser — including any SSO or single sign-on your organization uses.
- Clonit polls in the background and, once you approve, stores the resulting session locally.
Identity is owned entirely by the auth service. Clonit never sees or stores your password, and it runs no sign-in flow of its own — it simply hands you off to the auth service and receives a session back.
Prerequisites
Section titled “Prerequisites”You only need cloud.url set in your config before signing in:
cloud: url: "https://cloud.clonit.ai"You can set this with clonit config edit. See Connect Your
Agent for the full cloud setup, and
Configuration for the complete config reference.
Sign in
Section titled “Sign in”clonit loginClonit prints a short code and a verification URL, opens the URL in your browser, and waits for you to approve. Once approved, you are signed in and the session is stored locally.
Signing in over SSH or in a headless shell
Section titled “Signing in over SSH or in a headless shell”If you are on a remote machine with no browser, pass --no-browser. Clonit
prints the verification URL and code instead of trying to open a browser — open
the URL on any device, enter the code, and approve:
clonit login --no-browserCheck who you are
Section titled “Check who you are”clonit whoamiThis shows the currently signed-in identity and validates that the stored session is still good. Use it to confirm you are signed in (and to which account) before running cloud operations.
Sign out
Section titled “Sign out”clonit logoutThis clears the stored session. After signing out you will need to run clonit login again before using cloud features.
A typical login lifecycle
Section titled “A typical login lifecycle”clonit login # print a code + URL, open the browser, approveclonit whoami # confirm the current login and validate the sessionclonit logout # clear the stored session when you're doneWhere your session is stored
Section titled “Where your session is stored”Your session — the access and refresh tokens that prove you are signed in — is stored in:
~/.config/clonit/credentials.jsonThis file is created with 0600 permissions (readable and writable only by you)
and is kept separate from config.yaml. Clonit refreshes the session
automatically as it expires, so you stay signed in across commands without
re-running clonit login each time.
Login flags
Section titled “Login flags”| Flag | Description |
|---|---|
--no-browser |
Print the verification URL and code instead of opening a browser. Use this over SSH or on headless machines. |
--auth-url |
Override the auth service URL instead of discovering it from the cloud. Useful for an air-gapped or self-hosted auth service. |
--client-id |
Override the OAuth client_id instead of discovering it from the cloud. |
--scope |
Request an optional OAuth scope. |
You normally need none of these — clonit login discovers everything from
cloud.url. The --auth-url and --client-id overrides exist for self-hosted
or air-gapped deployments where you want to pin those values explicitly.
Humans vs. automation
Section titled “Humans vs. automation”clonit login is for people. The browser-based device grant is the right
choice for interactive use on your own machine.
Troubleshooting
Section titled “Troubleshooting”- “cloud.url is not set” — Sign-in needs to know which cloud to talk to. Set
cloud.urlwithclonit config edit, then try again. - The browser didn’t open — Run
clonit login --no-browserand open the printed URL yourself, or copy it to another device. - The code expired before you approved — User codes are short-lived for
security. Just run
clonit loginagain to get a fresh code. clonit whoamisays you’re not signed in — Your session may have been cleared or expired beyond refresh. Runclonit loginagain.
See Also
Section titled “See Also”- login command — Full flag reference for
clonit login - logout command — Reference for
clonit logout - whoami command — Reference for
clonit whoami - Connect Your Agent — Cloud setup, agent registration, and API keys
- Cloud Storage — Push and pull snapshots with cloud-managed storage
- Configuration — Full config reference, including the
cloudblock