CLI and APIs
Switch between two accounts
You have a work account and a personal account on the same forge. src keeps both logins, and uses one at a time.
1 min read
1. Log in with the other account
src auth login
Approve the login with the other account. That account is now active.
2. Switch back
src auth switch
With two accounts on a host, src auth switch picks the other one.
Done
src acts as the active account, and keeps the other login for the next switch. src auth status shows who you are.
More account commands
- If you have more accounts or more hosts, name the account:
src auth switch --user <name> --hostname <host>. src auth refreshruns the browser login again for the active account, and keeps the new token.src auth logout --user <name>forgets one account.
Note
While SRC_TOKEN is set, src uses it. Then auth switch and auth refresh stop with an error.