Skip to content

ph connect ​

Connect GitHub/GitLab with your token (host detected from origin): ph connect [github|gitlab|jira]

This page is generated from ph connect --help by npm run gen in site/, so do not edit it by hand.

text
Usage: ph connect [github|gitlab] [--host <host>] [--token-stdin] [--reuse | --no-reuse] [--method reuse|oauth|paste] [--device]
text
       ph connect token [--host <host>] [--json]
text
       ph connect jira [--base-url <url>] [--email <email>] [--api-version 3|2] [--token-stdin]   (link your Jira account: ph connect jira --help)
text
Connect Phillip to your source control and task system with your own token (stored in this machine's secret store).
Inside a repo with an origin, Phillip detects the host; for an unknown host it asks "GitHub or GitLab?" and remembers
the answer (scmHosts in the user config). Outside a repo, name the provider (and --host for a self-hosted server).
The kit-scm-<provider> plugin comes from the project's phillip.lock; if it is missing, it is installed for the user from Tara.
Token order: environment variable; a saved Phillip token that is still valid; a token already on this machine (gh auth token,
glab, git credential helper; only personal tokens with a known prefix, always after asking you first); then OAuth (if an
administrator registered an OAuth app for the host: you only click Authorize or enter a code, no token to create); finally paste by hand.

--reuse ​

text
--reuse      use a token already on this machine without asking (non-interactive runs only do this step with this flag)

--no-reuse ​

text
--no-reuse   skip the step that looks for an existing token

--method ​

text
--method     force a single method: reuse (existing token), oauth (non-interactive: device flow only, prints the code), paste (paste by hand)

--device ​

text
--device     OAuth with the device flow (enter a code) instead of opening a browser; chosen automatically when no browser can open

token ​

text
connect token   prints {"token","expiresAt"} for the host (default: the origin host), refreshing it if it is about to expire;
                Bandum local calls this command to get a token. Needs --json when stdout is a terminal (keeps the token off the screen).
text
Example: ph connect          (inside a repo)
text
         ph connect github
text
         ph connect gitlab --host gitlab.example.com