# Logging in with the CLI
Source: https://docs.chain.link/cre/account/cli-login
Last Updated: 2026-03-26


To deploy and manage workflows with the CRE CLI, you need to authenticate your CLI session with your CRE account. This guide walks you through the browser-based login process.

> **TIP: CI/CD or headless environment?**
>
> If you need to authenticate without a browser (e.g., in a CI/CD pipeline), use [API key authentication](/cre/reference/cli/authentication#api-key-authentication) instead.

## Prerequisites

- [CRE CLI installed](/cre/getting-started/cli-installation) on your machine
- [CRE account created](/cre/account/creating-account)
- Access to your authenticator app for two-factor authentication

## Login process

### Step 1: Initiate login from the terminal

Open your terminal and run the login command:

```bash
cre login
```

This command will automatically open your default web browser to begin the authentication process.

> **TIP: Browser doesn't open?**
>
> If your browser doesn't open automatically, the CLI will display a URL that you can manually copy and paste into your
> browser.

### Step 2: Enter your email address

In the browser window that opens, enter the email address associated with your CRE account and click **"Continue"**.

(Image: Image)

### Step 3: Enter your password

Enter your account password and click **"Continue"**.

(Image: Image)

### Step 4: Complete two-factor authentication

You'll be prompted to complete two-factor authentication based on the method you configured during account creation:

- **If you set up an authenticator app**: Open your authenticator app and enter the 6-digit one-time code it generates for your CRE account.
- **If you set up biometric authentication**: Use your fingerprint or face recognition as prompted by your device.

Example of entering a one-time code from an authenticator app:

(Image: Image)

### Step 5: Confirm successful login

Once authenticated, you'll see a confirmation message in your browser:

(Image: Image)

You can now close the browser window and return to your terminal. Your terminal will display:

```bash
Login completed successfully
```

Your CLI session is authenticated and ready to use.

In the terminal, the CLI may show **“Fetching user context…”** while it downloads your organization’s tenant configuration from the platform. It then writes **`~/.cre/context.yaml`** (registry manifest: vault gateway URL, registries, secrets auth flows, and related fields). That file is separate from your credentials file (`cre.yaml`). For details and a sanitized example, see [Tenant context cache](/cre/reference/cli/authentication#tenant-context-cache).