Troubleshooting CLI Authentication Errors
"Authentication required"
# Check auth status
surestage auth status
# Re-login
surestage auth login
"Token expired"
# Refresh token
surestage auth refresh
# If refresh fails, re-login
surestage auth login
"Invalid API key"
- Verify the key hasn't been revoked in the dashboard
- Check the environment variable is set correctly:
echo $SURESTAGE_API_KEY - Generate a new key if needed
Browser Not Opening for Login
If the CLI can't open a browser:
# Manual auth - copies URL to clipboard
surestage auth login --no-browser
Then paste the URL into your browser manually.