Solve a problem
Fix CLI login
Recover when alterac.ai CLI login fails, credentials expire, or a two-factor challenge cannot be completed.
Use this page when a production alterac-ai command cannot authenticate. CLI authentication uses the same account and two-factor protections as the application.
Run:
alterac-ai login
Complete the email, password, and current authenticator-code prompts. Then rerun the command that stopped.
The expected result is a successful login followed by normal command output. If the command is being run in an initialized repository, keep using that repository rather than copying its local configuration elsewhere.
First run alterac-ai login again and finish the interactive sign-in. If you intentionally need to change accounts, run alterac-ai logout first, then run alterac-ai login.
The expected result is that the next command uses the newly accepted account. If the authenticator is unavailable, the CLI cannot accept a recovery code. Sign in to the application with an unused recovery code, restore access to the authenticator, then retry alterac-ai login. If no authenticator or recovery code remains, see Fix account access instead of trying to remove authentication files manually.
Check the account shown by the successful login and make sure you are using the CLI distributed for your organization. Production commands do not need a local API address. Developers testing a local build should follow their project's development instructions; that is separate from normal user recovery.
The expected result is that the command can read the projects and work available to the signed-in account. If it cannot, use the application to confirm that the account has access without attempting to infer resources you cannot open.
If sign-in succeeds but repository commands fail, see Fix repository setup. See alterac.ai terminology for the identifiers shown by CLI output.
