HotCodePush

login

How hotcodepush login signs you in with a one-time code in the browser, where the session lives and how --api-url points the CLI at another API.

Log in by approving a one-time code in the browser. The session stays on this machine, as Files says, and HOTCODEPUSH_TOKEN wins over it on every command, so CI never logs in.

Without a terminal the command cannot wait: it exits with the page and the code in the error's fix. The next login redeems the code once a person approved it.

You rarely type login yourself: a command that needs a login and finds no stored session, or finds the stored one ended, asks Log in now?, runs the login in place and then goes on with what you asked. That happens only interactively: a terminal, no CI, and neither --no-input nor --yes. A session lasts thirty days and is renewed while in use, so the question comes after thirty days away. Non-interactively a missing session is not_logged_in, and a session that ended is the API's unauthenticated, since the CLI then leaves the stored token to the API.

OptionTypeDescription
--api-url <url>stringThe API to log in to, kept in config.json for every later command. Defaults to the one kept there.
hotcodepush login
hotcodepush login --api-url https://api.example.com --json

Last updated on