p0 login
Below is a troubleshooting guide for p0 login
Error: The P0 organization ID is required. Please provide it as an argument or set P0_ORG
.
You ran p0 login
without supplying <org-id>
and haven’t defined the P0_ORG
environment variable.
1. One-off login: bash p0 login my-org-id
2. Persistent env var: bash export P0_ORG=my-org-id p0 login
3. Verify: bash echo $P0_ORG # should output your org slug
Error: Could not find organization
The CLI reached Firestore but did not match any record to your <org-id>
.
Exact match: Confirm the slug matches (case-sensitive) your P0 admin’s value.-
Network: Ensure outbound HTTPS to *.firebaseio.com
isn’t blocked by VPN/firewall.
Reset var: bash<br> unset P0_ORG<br> p0 login correct-org-id<br>
-
Debug: Run with DEBUG=plugin-login p0 login my-org-id
to see request/response details.
Symptom: No browser window appears and “Waiting for authentication…” hangs indefinitely.
• No default browser is configured (or $BROWSER
isn’t set).• A pop-up blocker or privacy setting is preventing the SSO window.
Set browser manually: bash<br> export BROWSER=google-chrome # or "firefox" / "open" on macOS<br>
Allow pop-ups: Enable pop-ups for the P0 login domain in your browser settings.
Headless/server: • Use SSH with X11 forwarding (ssh -X
). • Or run p0 login
locally on your desktop.
Error: EACCES: permission denied, open '~/.p0/config.json'
Your home directory or the ~/.p0
folder isn’t owned or writable by your user account.
1. Fix permissions: bash<br> mkdir -p ~/.p0<br> chown $(whoami):$(whoami) ~/.p0<br> chmod 700 ~/.p0<br>
2. Verify ownership: bash<br> ls -ld ~/.p0<br>
3. Retry login: bash<br> p0 login my-org-id<br>
Symptom: Every command asks you to login again, or you see “Please run p0 login <organization>
to use CLI.”
Your saved token has expired or could not be auto-refreshed due to clock skew or missing refresh grant.
Full logout & login: bash<br> p0 logout # clears ~/.p0/config.json and identity token<br> p0 login my-org-id<br>
Clock sync: Ensure your system clock is accurate: bash<br> sudo ntpdate pool.ntp.org # or use your OS’s time-sync service<br>
Error: Could not find organization, logging out immediately after SSO
You authenticated successfully, but the tenant-access check failed because your user isn’t in that P0 org.
1. Access rights: Confirm your user account is added to the correct P0 tenant in the P0 web UI.
2. Org slug: Verify you’re logging into the exact org slug your admin provided.
3. Support: If everything looks correct, share your SSO assertion logs with [email protected].
Quick Cleanup & Full Retry
p0 logout
rm -rf ~/.p0
p0 login <your-org-id>
Still having trouble? Email [email protected] with:
Your org slug
Full error message and stack trace
Relevant env vars (
P0_ORG
,BROWSER
, system time, etc.)
Last updated