# hub login

Source: https://docs.myhub.host/cli/login

Log in or create an account in the browser. For CI, set `HUB_TOKEN` and `HUB_ORG` using a deploy token.

With no `--email`, `hub login` prints a link. The page there logs you in, or creates your account and its org, and then connects this terminal.

For CI and scripts, create an org-scoped deploy token with `hub tokens create` or in Dashboard → Settings → Integrations. Store it as the `HUB_TOKEN` secret and set `HUB_ORG` to the organization slug. No `hub login` is needed in CI.

With `--email` (or `HUB_EMAIL`) it logs in with the password (`--password` or `HUB_PASSWORD`). New Cloud accounts use the browser to verify their email. On a local installation without hosted authentication, `--name` and `--org` (or `HUB_NAME` and `HUB_ORG`) explicitly request account creation. In a terminal it asks first.

`hub signup` is the same command.

## Usage

```sh
hub login|signup [options]
```

## Options

| Option                  | Description                                                                            |
| ----------------------- | -------------------------------------------------------------------------------------- |
| `--email <email>`       | Log in with this email and a password, with no browser.                                |
| `--password <password>` | Legacy password login; use `HUB_TOKEN` for CI.                                         |
| `--org <org>`           | Your org by name: which of yours to use, or the name of the org a new account creates. |
| `--name <name>`         | Your name, to create an account with `--email`.                                        |

## Examples

```sh
# Log in or sign up in the browser
hub login

# Legacy password login for an existing account
hub login --email ana@acme.com
```