Appearance
turbo login
Use turbo login to sign in to a Turbo Server, to sign in an unattended job as a registered client, or to check who commands run as.
Usage
text
turbo login [<server>] [--device-code] [--switch] [--product=desktop|sandbox]
turbo login [<server>] --client-id=ID (--client-secret-stdin | --client-secret=SECRET)
turbo login --statusDescription
Without options, turbo login opens your browser at the server's sign-in page. The server decides how you sign in there: a password, your Windows sign-in, or your organization's identity provider. When you are already signed in, the command reports who you are instead; add --switch to sign in as someone else.
- Server.
<server>names the deployment to sign in to, such asturbo.netorturbo.company.com, and signing in switches this computer to it. Without it, the command signs in to the server set with turbo config--domain, or to turbo.net when none is set. A sign-in is kept per server, so you can hold one for each. - Headless computers.
--device-codeprints a code to enter in a browser on another device, for a computer whose own browser cannot reach you. - Unattended jobs. A script, scheduled task or build agent signs in as a registered client with
--client-idand the client's secret. A Server Administrator registers the client with ts clientnew, which binds it to a service account; the account's groups decide what the job can reach. Give the secret through--client-secret-stdinor theTURBO_CLIENT_SECRETenvironment variable: a secret given as--client-secretcan be read by every process on the computer. - Per Windows account. A sign-in belongs to the Windows account that ran the command. There is no sign-in shared by all users of a computer.
- Which app. With Turbo Desktop and Turbo Sandbox installed side by side,
turbo loginsigns in both.--productnarrows it to one.
A server with no OAuth sign-in, such as a Turbo Server 1.0, is the one case where turbo login prompts for a username and password in the console.
Retired options
--api-key and --auth no longer exist. Each one still parses and then fails, with a message naming the replacement: sign in as a registered client with --client-id and its secret. Turbo Server no longer issues API keys, and the server's sign-in page, not the command line, chooses the authentication method. The username and password arguments are gone too.
Options
| Flag | Description | Notes |
|---|---|---|
<server> | The deployment to sign in to. | Optional. Signing in switches this computer to it. |
--device-code | Sign in by entering a code in a browser on another device. | For headless computers. |
--switch | Sign in as a different account, ending the current session first. | |
--client-id=ID | Sign in as a registered client, for an unattended job. | Requires the client's secret. |
--client-secret-stdin | Read the client's secret from standard input. | Keeps the secret off the command line. |
--client-secret=SECRET | The client's secret. | Readable by other processes; prefer --client-secret-stdin or TURBO_CLIENT_SECRET. Not with --client-secret-stdin. |
--status | Say who commands run as and where that identity comes from, without signing in. | Not with a server or a sign-in option. |
--product=desktop|sandbox | The app whose sign-in to act on. | Every installed app's when omitted. |
--format=json | Write the result as JSON. |
Examples
bash
# Sign in to the configured server in your browser
turbo login
# Sign in to another deployment, which switches this computer to it
turbo login turbo.company.com
# Sign in from a computer with no usable browser
turbo login --device-code
# Sign in a build agent as a registered client, with the secret piped in
echo "$TURBO_CI_SECRET" | turbo login --client-id=ci-deploy --client-secret-stdin
# Say who commands run as
turbo login --statusA script that still signs in with turbo login --api-key=... fails on every server. Register a client for it with ts client new <client-id> --service-account=<account> and sign in with --client-id instead.
Output
With --format=json, the result carries a user object, or an error object when the command fails. user has the server's domain and the signed-in login, and source when --status asked where the identity comes from.
Exit Codes
0on success.-4when--statusfinds nobody signed in.-7when the command line does not parse, including the retired--api-keyand--auth.
Related Commands
- turbo logout — Sign out.
- turbo config — Set the server this computer uses.
- ts client — Register the client an unattended job signs in as.
