Set up GitHub access for Coding
Register and install a GitHub App, configure its Client ID, and connect Minara for HTTPS Git and pull requests
This guide connects Coding to GitHub through a repository-scoped GitHub App. After setup, Minara can authenticate HTTPS Git operations and create pull requests with the GitHub account you authorize.
Check the GitHub remote
Confirm that the repository points to GitHub:
git remote -vBoth [email protected]:owner/repo.git and https://github.com/owner/repo.git
are supported. Minara uses the GitHub account you authorize and performs the
authenticated network operation over HTTPS, without changing the checkout's
configured remote.
Prerequisites
- Permission to create a GitHub App under a personal account or organization.
- Permission to install the app on the target repository. An organization owner may need to approve the installation.
- A source checkout of Minara Agent if you are configuring a development build.
1. Register the GitHub App
- Open GitHub Settings.
- Select Developer settings.
- Select GitHub Apps.
- Select New GitHub App.
- Choose the owner that owns the repositories Minara must reach. For an organization repository, create the app under that organization when possible.
Configure the registration form as follows:
| Setting | Value |
|---|---|
| GitHub App name | A unique name such as Minara Coding |
| Homepage URL | Your product, organization, or repository URL |
| Callback URL | Leave empty. Device Flow does not use it |
| Expire user authorization tokens | Keep enabled |
| Request user authorization during installation | Leave disabled |
| Enable Device Flow | Enable |
| Webhook Active | Disable |
| Where can this GitHub App be installed? | Only on this account for one owner, otherwise Any account |
Minara uses Device Flow because Desktop starts authorization locally and the user confirms it in a browser.
2. Set repository permissions
Under Repository permissions, configure only these permissions:
| Permission | Access | Used for |
|---|---|---|
| Contents | Read and write | Fetching and pushing Git objects over HTTPS |
| Pull requests | Read and write | Finding and creating pull requests |
| Metadata | Read-only | Repository identity and metadata |
Leave unrelated repository, organization, and account permissions at No access. Select Create GitHub App when the form is complete.
3. Install the app on the repository
- Open the new GitHub App's settings page.
- Select Install App.
- Select the personal account or organization that owns the repository.
- Choose Only select repositories.
- Select every repository that Minara should access.
- Select Install. If GitHub shows Request, an organization owner must approve the request before Minara can use the repository.
Installation grants repository access. The later Minara sign-in authorizes one user to act through that installation. Both are required.
4. Copy the Client ID
Return to the GitHub App settings page and copy Client ID. Do not copy App ID. GitHub App Client IDs commonly look like this:
Iv1.8a61f9b3a7aba766The Client ID is public application metadata. Minara's Device Flow does not need a Client Secret or GitHub App private key.
5. Configure a Minara development build
Add the Client ID to the repository root .env file:
MINARA_GITHUB_APP_CLIENT_ID=Iv1.8a61f9b3a7aba766Replace the example with the Client ID copied from GitHub. Fully quit and restart Minara Desktop so the Gateway registers the provider during startup:
pnpm dev:desktopProduction distributions should ship a configured public Client ID. End users should not need to register a separate app for every installation.
6. Connect GitHub in Minara
- Open Settings in Minara.
- Select Git access.
- Under Connect GitHub, select Connect GitHub.
- Minara opens GitHub's device page and displays a one-time code.
- Enter the code, confirm the GitHub account, and approve the app.
- Return to Minara. The account appears with Ready status.
Verification
- Confirm the GitHub account shows Ready under Git access.
- Confirm the target Git remote points to
github.comusing SSH or HTTPS. - Ask Coding to fetch or push the branch.
- For pull requests, confirm the app is installed on the repository and has Pull requests: Read and write.
Troubleshooting
| Symptom | Resolution |
|---|---|
| Connect GitHub is unavailable | Set MINARA_GITHUB_APP_CLIENT_ID, then fully restart Desktop |
| GitHub says the Client ID is invalid | Copy Client ID, not App ID or Client Secret |
| GitHub does not show a device page | Enable Device Flow in the GitHub App registration |
| Authorization succeeds but the repository returns 403 or 404 | Install the app on that repository and approve pending organization access |
| Push is denied | Set Contents to Read and write and approve the changed permission |
| Pull request creation is denied | Set Pull requests to Read and write |
Security model
- Minara stores the user access token in its encrypted credential store, not in SQLite or the conversation transcript.
- Device codes expire and are single-use.
- The app can reach only repositories included in its installation.
- The user's own repository permission and the app permission both apply.
- Disconnecting the GitHub profile removes Minara's stored credential.