luna login
Log this machine in to your Luna account by approving it in your browser.
luna login opens an approval page in your browser, waits while you approve this machine there, and saves the login.
luna login
Reference
luna login [OPTIONS]
| Option | Type | Default | Does |
|---|---|---|---|
--no-browser |
flag | Off | Prints the address to open and leaves the browser alone. |
Good to know
- The command prints a code. Check that the page in your browser shows the same code, then approve it there. Your password is typed in the browser and never passes through the CLI.
- The code expires after 10 minutes. Run
luna loginagain to get a new one. A login denied in the browser ends the command with an error. - On a machine with no screen, the command prints the address for you to open elsewhere. Setting
LUNA_NO_BROWSERto anything but0does the same as--no-browser. - The login is an account key that can read and change everything your role allows. Its name is
CLI:and this machine’s name, andluna tokens list --accountshows it. It is saved in~/.luna/credentials.json, which only your user can read. - Logging in again as the same person keeps the organisation that
luna orgs usechose. - A command that finds no login stops with exit code 3. Run
luna login, or setLUNA_TOKENto an API token.
Examples
Log in on a remote machine
luna login --no-browser
Check who this machine is logged in as
luna whoami