Sign in
Sign in through your browser or with an API key, connect several companies, and sign out or revoke access.
In the browser (recommended)#
gitpanda loginIt works like gh auth login:
- The terminal shows a one-time code, like
W C Z X - T S F D. - Press Enter. OkayPanda opens in your browser at
okaypanda.com/app/device. Sign in there if you need to. - Check the code in the browser matches your terminal. If it doesn't, click Cancel: someone else's terminal is asking.
- Tick the companies you want to use from this terminal. You can pick several.
- Choose what it can do:
| Choice | What it allows |
|---|---|
| Read and work (recommended) | Clone, pull, history, push documents, ask rooms, start goals, write code. |
| Read only | Clone, pull and history. Nothing that changes your company. |
| Also approve work | Decide approvals and turn on auto mode from the terminal. Only for owners and admins. |
- Click Approve. Back in the terminal, it finishes signing in and lists your repositories:
โ Signed in as you@company.com
๐ผ acme Acme https://okaypanda.com/git/acme
๐ผ acme-labs Acme Labs https://okaypanda.com/git/acme-labs
โ Next: gitpanda clone acme get your companyThe code is valid for 15 minutes and works once. If it expires, run gitpanda login again.
If the browser doesn't open#
Copy the address the terminal prints into any browser, on any device. You can even approve from your
phone: go to okaypanda.com/app/device and type the code.
Adding more companies#
Run gitpanda login again and tick the new ones. Companies you already connected stay connected.
With an API key#
Use a key for scripts, CI and servers, where there's no browser.
- In OkayPanda, open GitPanda โ โจ Command line โ Use an API key instead.
- Give it a name, pick its scopes (Read, Work, Approve), and click Make a key.
- Copy it. It starts with
opk_and is shown once.
Then save it:
gitpanda login --key # paste it when asked (it isn't echoed)or use it without saving anything, for one command or a whole job:
GITPANDA_KEY=opk_โฆ gitpanda clone acmeA key belongs to one company. For several companies, make one key each, or use browser sign-in.
Scopes#
Every key, whether from the browser or made by hand, has scopes:
| Scope | Lets the terminal |
|---|---|
read |
Read the repository, history, goals, rooms and approvals. Always included. |
work |
Push documents, ask rooms, start and message goals, ask for code. |
approve |
Decide approvals and use --auto. Owners and admins only. |
Your role in the company still applies: a key never does more than you could in the app, and your role is checked again on every request. If you're a viewer, a key can only read.
Who am I?#
gitpanda whoami # the account, company, role and scopes in use here
gitpanda repos # every company you're signed in to
gitpanda info # inside a clone: which account it usesInside a clone, gitpanda uses that clone's company. Outside a clone, it uses your default, which you
set with gitpanda use <repo>.
Signing out#
gitpanda logout acme # forget one company on this computer
gitpanda logout # forget all of themThis removes the keys from this computer only. To stop a key everywhere, revoke it in OkayPanda:
GitPanda โ โจ Command line โ Signed-in terminals and keys โ Revoke. Each terminal that signed in
through the browser is listed as "gitpanda on
Other servers#
To sign in to another OkayPanda server (for example, staging):
gitpanda login --host https://staging.okaypanda.pages.devor set GITPANDA_HOST for a single command.