Use a GitHub token for pull requests
Paste a GitHub access token once and it covers fetch, pull, push and pull requests — gh installed, but never signed in.
Since GitLane v2.6.0, a GitHub access token saved in GitLane covers pull requests as well as fetch, pull and push. The GitHub CLI, gh, still has to be installed, because GitLane runs pull-request calls through it — but it no longer needs to be signed in. Useful on a machine where you'd rather not leave a gh login lying around, or when your organization hands you a fine-grained token.
Create the token
On GitHub, create a fine-grained token (recommended) or a classic one.
- Fine-grained: pick the account or organization that owns the repositories, give it access to them, and set Contents to Read and write if you want to push (Read is enough to fetch and pull). An organization may need an admin to approve the token.
- Classic: the
reposcope, plusworkflowif you push changes to.github/workflows.
Save it in GitLane
- Open Settings → Accounts and connect GitHub.
- Pick Access token. One method shows at a time; each says what it covers.
- Under Store in, choose GitLane, in your system keychain.
- Enter your GitHub username and paste the token, then Save and check.
GitLane checks the token against the open repository's remotes straight away. The check only reads, so a read-only token passes it; pushing still needs write access.
What changes
The repository's Remotes card shows Pull requests enabled, and the PRs tab loads with the token. For each pull-request call GitLane reads the token from the keychain and hands it to that one gh process — it never crosses into the app's frontend, and gh's own login state is left alone.
If a gh account is bound to the repository, that account still wins. The token is the fallback when no gh account is.
Good to know
Where the token is stored decides what it covers. In GitLane's keychain, it answers fetch, pull, push and pull requests. In your own Git credential helper, it's shared with Git in the terminal, but pull requests still go through a signed-in
gh.
If a save fails, GitLane says why. When another credential helper is answering for github.com with a different username, it names that username and offers to forget it and save again.
Remote repositories over SSH are unaffected: they use the server's own gh login, and no GitLane token is sent there.
More: Accounts and identities · Pull requests.
Installers: Download GitLane.