MeshMeshBeta
Guides

Connecting GitHub

Let agents work in your GitHub repositories as you — on github.com, GitHub Enterprise Cloud, or your own GitHub Enterprise Server

The GitHub integration lets agents clone repositories, create branches, commit and push. It uses the MeshMesh GitHub App, so there's no personal access token to create or paste.

How access works

Agents act as you. On any repository, an agent can do only what all three of these allow:

  • Your own GitHub access. If you can't see a repository, neither can the agent.
  • The GitHub App's permissions.
  • Where the App is installed. It must be installed on the org or account that owns the repository.

Each person in your workspace connects their own GitHub account. Agents use the GitHub connection of the person who runs them.

Which GitHub do you use?

You useWhat to do
github.com, including GitHub Enterprise Cloud organizationsConnect directly. Leave the server address empty.
GitHub Enterprise Server (self-hosted, for example github.yourcompany.com)Available on request. Your GitHub admin does a one-time setup first. See GitHub Enterprise Server.
GitHub Enterprise Cloud with data residency (yourcompany.ghe.com)Contact your MeshMesh team.

Connect github.com

Open the GitHub integration

Open the Integrations menu and select GitHub.

Leave the server address empty

The GitHub Enterprise Server address (optional) field is only for self-hosted servers. Leave it empty for github.com, including GitHub Enterprise Cloud organizations. If you paste a github.com link, MeshMesh uses github.com.

Sign in and approve

GitHub opens and asks you to authorize MeshMesh. Approve it. The window closes on its own when you're done.

Install the App where your repositories live

If the GitHub App isn't installed on any account that has repositories you can reach, GitHub takes you to its install page. Choose the org or account and the repositories.

To add another org later, use Add a GitHub org on your GitHub connection.

Organization approval

In many organizations only an org owner can install GitHub Apps. If you aren't one, GitHub sends the owner a request and your connection shows Waiting for approval until they approve it.

GitHub Enterprise Server

Available on request

GitHub Enterprise Server needs a one-time setup by your GitHub admin and your MeshMesh team. Contact your MeshMesh team to start. Most setups take a day or two.

GitHub Apps only exist on the server they were created on. Because of that, a MeshMesh GitHub App is created on your server, and MeshMesh is told about it.

What your GitHub admin does

Create the GitHub App on your server

On your GitHub Enterprise Server, go to Settings → Developer settings → GitHub Apps → New GitHub App (for an organization-owned App, use the organization's settings). Use:

  • GitHub App name: MeshMesh. This is the name your developers see.
  • Callback URL and Setup URL: https://gateway.meshmesh.io/api/v1/github-app/callback
  • Request user authorization (OAuth) during installation: on
  • Expire user authorization tokens: on
  • Webhook: off. MeshMesh doesn't use webhooks.
  • Permissions: the ones your MeshMesh team sends you

Generate the credentials

On the App's page, note the App ID, the App's name in its URL, and the Client ID. Then generate a client secret and a private key (a .pem file).

Send them to MeshMesh securely

Share the App ID, App URL name, Client ID, client secret and private key with your MeshMesh team over the secure channel they set up. Don't send them by email or chat. MeshMesh stores the client secret and private key encrypted.

Install the App on your orgs

Install the App on the organizations and repositories agents should work in. Do this before developers connect, because most developers can't install Apps themselves.

Network requirements

  • MeshMesh must be able to reach your server over HTTPS. If your server only accepts connections from allowed IP addresses, ask your MeshMesh team for the addresses to allow.
  • Your server's certificate must be issued by a public certificate authority.

After setup

Your developers open Integrations → GitHub, enter your server's address (for example github.yourcompany.com) in GitHub Enterprise Server address (optional), then sign in with their own account on your server.

You stay in control

Suspending or deleting the MeshMesh GitHub App on your server cuts off MeshMesh's access right away. You can also remove the App from individual organizations or repositories at any time.

Troubleshooting

You seeWhat it means
MeshMesh isn't set up for this GitHub Enterprise Server yetThe one-time setup for that server hasn't been done. Check the address, or contact your MeshMesh team to set it up.
Enter your GitHub Enterprise Server address, like github.yourcompany.comThe address isn't valid. Enter just the server name, without https:// or a path. For github.com, leave the field empty.
Waiting for approvalAn org owner needs to approve the GitHub App installation.
No repositoriesMeshMesh can't see any repository you have access to. Ask an org owner to install the App on it.
Blocked by IP allowlistThe org only accepts connections from allowed IP addresses. Ask an org admin to allow MeshMesh.
This link expiredStart connecting again from MeshMesh.
Reconnect neededConnect GitHub again to keep using it.

GitHub (Legacy PAT)

Some workspaces still show GitHub (Legacy PAT), which stores a personal access token in the agent's environment. Use GitHub instead wherever you can: it works as you and doesn't store a long-lived token.