HubDocs

CLI reference

hub login

Log in, or create an account.

Log in, or create an account if you have none. Opens the browser unless --email is given.

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.

With --email (or HUB_EMAIL) it logs in with the password (--password or HUB_PASSWORD). It creates an account only when --name, --org and --code are all given, or HUB_NAME, HUB_ORG and HUB_SIGNUP_CODE, so a mistyped email never makes a second account. In a terminal it asks first.

hub signup is the same command.

Usage

hub login|signup [options]

Options

OptionDescription
--email <email>Log in with this email and a password, with no browser.
--password <password>Your password, with --email.
--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.
--code <code>The invite code, to create an account with --email.

Examples

# Log in or sign up in the browser
hub login

# Log in with a password, for scripts
hub login --email ana@acme.com

On this page