---
lastModified: 2026-11-24
---

# GitHub & Git

Amp uses Git to bring your code into an [orb](/docs/orbs) and to get the agent's changes back out.
For repositories on GitHub, Amp signs in as you through a GitHub App connection. The agent can then
clone private repositories, push branches, open pull requests, and read CI status, and you never
have to create or paste a token. This page explains how the connection works, what Amp uses it for,
and how commits made in orbs are attributed and signed.

Orbs also support **GitLab, Bitbucket, and other HTTPS Git hosts**. A GitHub connection is not
required to use those hosts. GitLab has its own integration; see [GitLab](/docs/integrations/gitlab). For other
hosts, see [Other Git Hosts](#other-git-hosts) for setup and the differences from the GitHub
integration.

## Connect GitHub

Open [Settings → Integrations & MCP](/settings/integrations) and click **Connect GitHub**.

<div class="docs-media-stage">
  <img class="docs-transparent-media" width="2306" style="aspect-ratio: 2306/1262" src="https://static.ampcode.com/docs/github-connect.png" alt="The Integrations settings page with a GitHub card that reads Allow the agent to clone and read private GitHub repositories when needed, and a Connect GitHub button" />
</div>

GitHub walks you through two steps:

1. **Authorize Amp.** This links your GitHub account to your Amp account. Amp uses the
   authorization to act as you when it talks to GitHub.
2. **Install the Amp app.** Pick the account or organization that owns your repositories, then
   choose **All repositories** or **Only select repositories**. Amp can reach exactly the
   repositories you select here, and only if your own GitHub account can reach them too.

If you already installed the app, for example because a teammate set it up for your organization,
GitHub skips the second step. If your organization requires approval for third-party apps, an
organization owner has to approve the installation before Amp can see its repositories.

Once connected, the GitHub sheet lists each GitHub account you connected and which accounts and
organizations it can read, with all or selected repositories. Click an account or organization
name to change its repositories on GitHub.

<div class="docs-media-stage">
  <img class="docs-transparent-media" width="1752" style="aspect-ratio: 1752/126" src="https://static.ampcode.com/docs/github-connected.png" alt="The GitHub integration card after connecting, titled @thorsten on GitHub, with an info icon and Configure and Disconnect buttons" />
</div>

- **Choose Repositories** opens GitHub's account picker for the Amp app. Pick an account or
  organization where Amp is already installed to add or remove repositories, or pick another
  organization to install Amp there. GitHub uses the account you are signed in to on github.com.
  An organization owner may need to approve the installation.
- **Connect Another** links a second GitHub account, such as a work account.
- **Reconnect** appears when the connection has expired or was revoked on GitHub. Click it to
  sign in again; your repository selection stays as it is.
- **Disconnect** deletes the token Amp holds for that account. It does not uninstall the app from
  GitHub. To remove the app itself, uninstall it from your
  [GitHub application settings](https://github.com/settings/installations).

## What Amp Uses the Connection For

- **Creating projects.** The **New Project** dialog lists the repositories your connection can
  reach. See [Projects](/docs/projects).
- **Cloning into orbs.** Before a new orb starts, Amp checks that your connection can reach the
  project's repository and then clones it into the orb.
- **Pushing and pull requests.** `git push` and `gh` in the orb run as you. Pushes, branches, and
  pull requests show up on GitHub under your account, unless the project
  [acts on GitHub as Amp](#act-on-github-as-amp).
- **Commit, pull request, and CI details in threads.** When the agent mentions a commit or pull
  request, the thread shows a preview with its status. [Puck](/docs/puck) uses the same
  connection to check CI for you.

Public GitHub repositories clone into orbs without a connection. Everything else on this list needs
one.

Amp can only write to a repository when the Amp app is installed on the account or organization
that owns it and the installation includes that repository. This is true even if your GitHub
account is an admin of the repository.

When a pull request's description has an `Amp-Thread-ID:` line with a thread URL or `T-…` ID, the thread's title bar lists
that pull request and its status: open, draft, queued, merged, or closed. Queued means the pull
request is waiting in a GitHub merge queue. Amp reads the description when the pull request is
opened or edited, so you can add the link later. This needs the Amp app installed on the repository.
To link every pull request, add "Add an `Amp-Thread-ID: <thread URL>` line to pull request descriptions" to your
[`AGENTS.md`](/docs/customize/agents-md).

## Act on GitHub as Amp

By default, orbs push, open pull requests, and comment as the person who started the thread. A
project can instead act as the Amp GitHub App's bot account. Pull requests then come from Amp, so
the person who asked for the change can review and approve them.

Choose this under **GitHub Identity**:

- **Personal or workspace default.** In [Settings → Projects](/settings/projects) or
  [Workspace Settings → Projects](/workspace), choose **Amp** or **Thread Creator**. Only
  workspace admins can change the workspace default. Click **Overridden by** next to
  **GitHub Identity** to see the projects that set their own and reset them to the default.
- **Per project.** In a project's settings, choose **Amp** or **Thread Creator** to override the
  default, or **Default** to follow it.

When a project acts as Amp, orbs use the bot only for that project's GitHub repositories, including
its additional repositories, and only where the thread creator's own GitHub connection can push.
Everywhere else, they keep using the thread creator's account. The bot can never write where the
thread creator could not write themselves. A lost push permission takes up to 10 minutes to
reach running orbs.

The Amp GitHub App must be installed on each repository, as it already must be for Amp to push
there. Branch protection rules apply to the bot as they would to any other app. Commit authorship
is separate: to make Amp the commit author too, set [Commit Identity](#commit-identity) to **Amp**.

Comments that the bot posts never reach Amp's [webhooks](#github-listeners). CI results for
commits it pushed do, and issues and pull requests it opens start
[orb spawners](#create-an-orb-spawner) like any others. On issues and pull requests the bot
opened, your own comments and reviews reach the thread's automatic subscriptions without
mentioning `@ampagent`.

<a id="github-listeners"></a>

## GitHub Webhooks

GitHub webhooks let Amp continue a thread when an event arrives, or spawn a new orb when someone
opens an issue or pull request or requests your review. Tell Amp which events to subscribe to and
which thread should receive them. You can also ask [Puck](/docs/puck) to create or manage your
webhooks.

### Set Up GitHub

[Connect your GitHub account](#connect-github) and install the Amp GitHub App on the account or
organization that owns your repositories. Include each repository you want to watch in the
installation. Amp checks both the installation and your connected account's access.

Events arrive through the Amp GitHub App, so Amp does not add a webhook to your repositories and
does not need access to repository webhooks. If GitHub requests approval for updated app
permissions, an installation owner must approve it.

Amp verifies incoming GitHub signatures. You do not need to create a plugin, copy a URL into
GitHub, or set up a polling schedule. You also do not need to keep a
dedicated orb alive to receive events or spawn new orbs.

### Follow an Issue or Pull Request

Ask in the thread that should receive the events. Include the repository, issue or PR number,
and instructions for handling updates:

```prompt
Monitor issue #42 in acme/widget for new comments. Summarize each update in this
thread and tell me whether it changes our implementation plan.
```

```prompt
Watch PR #81 in acme/widget for reviews and comments for the next 24 hours.
Address feedback in this thread and run the relevant tests. Ask me before pushing.
```

Issue subscriptions receive new comments and closed or reopened events. PR subscriptions also
receive submitted reviews and inline review comments, report commits that someone else pushes to
the PR with a link comparing the new head to the previous one, and report when the PR enters or
leaves a merge queue. When the merge queue starts checks for the PR, the event names the merge
group commit, so you can ask Amp to follow that commit's CI. These events continue the subscribed
thread rather than spawning another orb.

<div class="docs-media-stage">
  <img class="docs-transparent-media" width="1280" style="aspect-ratio: 1280/684" src="https://static.ampcode.com/docs/github-webhooks-issue-comments.png" alt="A request to monitor issue 38, the Created GitHub subscription tool call, and a new comment on the issue reaching the thread" />
</div>

From Puck, give the URL of the thread that should receive events. Use a thread you created that
is not archived. A thread on a local runner still needs that runner available to execute tools.

When events arrive, Amp fetches the linked content and summarizes the update, or summarizes the
supplied results for CI. It follows the thread's current task when there is one. Subscriptions do
not store custom instructions or grant permission to push changes, deploy, or carry out
instructions someone posts in a GitHub comment.

### Create an Orb Spawner

An orb spawner starts a new thread and orb for each matching newly opened issue or PR, or for
each [review request](#review-requests) you receive. The new thread follows the spawner's saved
instructions, or without them reads the issue or PR and summarizes it. Open the thread to continue
the work.

Ask Amp or Puck to set up a spawner. For one repository, choose a project connected to that
repository and tell Amp which agent mode to use. Use a workspace project, or your own personal
project for a repository owned by your personal GitHub account:

```prompt
For each new PR in acme/widget, start a new orb in our Widget project using
Medium mode.
```

You can filter new issues or PRs by a label present when they open. Adding the label later does
not trigger the webhook. You can also limit a PR spawner to PRs opened by one GitHub user, so
other people's PRs start no orb:

```prompt
For each new PR I open in acme/widget, start a new orb in our Widget project.
```

Comments and CI updates cannot be used to spawn new orbs.

You can also watch all repositories covered by the Amp app installation on your personal
GitHub account:

```prompt
For each new issue across my personal GitHub repositories, spawn a new orb
using Medium mode.
```

This includes current and future repositories that both the installation and your account can
access. Amp creates personal projects as needed for their repositories. This installation-wide
option is for your own personal GitHub account, not an organization installation.

Amp automatically subscribes each spawned thread to comments on its source issue, or comments
and reviews on its source PR. You can archive the thread where you set up the spawner without
stopping the spawner. Pause or delete the spawner when you no longer want new orbs.

Workspace admins can also create a spawner that belongs to the workspace and starts each orb as a
[service account](/docs/collaborate/workspaces#service-accounts), so the whole workspace can read
the orbs it starts.

<a id="review-requests"></a>

#### Review Requests

A spawner can also start an orb when someone requests your review on a pull request in one
repository. Requests for a team you belong to do not count. Save the steps you want the orb to
follow, such as how you review:

```prompt
When someone requests my review on a PR in acme/widget, start a new orb in our
Widget project. Review the PR the way I normally do. Do not post comments.
```

If one of your threads already follows that pull request, the request goes to that thread instead
of a new orb. A thread the spawner started follows its pull request, so when someone requests your
review again after new changes, that thread receives the request.

A review request spawner has these limits:

- It watches one repository. The installation-wide option for personal repositories does not
  apply.
- It always runs as you, so it cannot start orbs as a workspace service account.
- Ask Amp or Puck to create it. The **New Subscription** form in Settings does not offer it yet.

### Follow CI

CI subscriptions follow an exact commit, rather than every future commit on a branch. Ask Amp
to follow all checks for that commit, a specific GitHub Actions workflow, or a named check or
commit status reported to GitHub:

```prompt
Monitor CI for the commit we just pushed. Report failures with the relevant
logs and tell me when all known checks finish. Do not rerun jobs or deploy.
```

For a watch without a named workflow or check, Amp reads GitHub's check rollup for the commit.
The rollup includes individual jobs and external CI statuses. Matching CI webhooks prompt Amp
to refresh it immediately, and Amp also checks periodically in case a webhook is missed.
Queued and running checks appear in a row at the end of the thread, grouped by workflow with
links to their runs. The row hides while the agent is working. Failures reach Amp as soon as a
refresh confirms them, without waiting for the other checks.

<div class="docs-media-stage">
  <img class="docs-transparent-media" width="1280" style="aspect-ratio: 1280/1026" src="https://static.ampcode.com/docs/github-webhooks-follow-ci.png" alt="Amp pushing to main, creating a GitHub subscription for the pushed commit, and a Waiting on 3 checks row expanded to show the CI, CodeQL, and Deploy Preview workflows" />
</div>

Other results, including skipped checks, are grouped when the rollup is complete. The duration
comes from GitHub's check timestamps, not the time Amp spent watching. Completed results appear
in the transcript and the running status clears. CI messages steer an active agent rather
than waiting for its turn to finish.

Watching a named workflow, check, or commit status keeps the event-specific behavior for that
result instead of using the commit rollup.

"Complete" means the checks Amp currently knows about have finished. GitHub can start another
workflow afterward, so a completion result is not a guarantee that no more work will run.

### Automatic Follow-Ups

When GitHub subscription tools are available, Amp's instructions tell it to subscribe before
reporting a PR as complete, unless you opt out. These subscriptions cover the PR's comments
and reviews and the check rollup for its exact head commit.

Subscriptions you request explicitly remain separate. Automatic comment subscriptions stop when the issue or
PR closes and resume if it reopens, unless you paused them.

Automatic subscriptions skip comments you post yourself, since Amp usually posts them on your
behalf. To send one of your own comments to the thread, mention `@ampagent` in it. On issues and
pull requests opened by the Amp app's bot, Amp posts as the bot, so your comments arrive without
the mention.

Deleting an automatic subscription opts out of automatic follow-ups for that thread and target.
You can ask Amp to subscribe again explicitly.

### Manage Event Subscriptions and Deliveries

Open [Settings → Integrations & MCP](/settings/integrations) and expand the connected
**GitHub** service. **Event Subscriptions** lists orb spawners and subscriptions that send
events to existing threads in one table. Active orb spawners appear first, followed by active
thread subscriptions. **Inactive Subscriptions** is collapsed at the bottom of the table.

Each subscription has its own row, even when several send events to the same thread.

- **Subscription** shows the subscription's name. Click its name or chevron to expand its status
  and delivery history.
- **Events** shows the repository and events being watched.
- **Target** links to the receiving thread, or says **New orb** for a spawner.
- The row's **…** menu lets you **Pause** or **Resume** the subscription. Spawner rows also offer
  **Edit** to change the name or event filter. Ask Amp or Puck to update or delete a subscription.

Under an expanded row, **Deliveries** shows the events sent to its thread. For a spawner,
**Spawned Orbs** includes links to the threads it created. Each delivery shows its status and
time, plus an error if delivery failed. **Delivered** means the thread accepted the event, not
that the agent finished its work. Delivery history does not record edits or pause changes.

Check the subscription's status for setup or access problems. It is not ready until Amp finishes
setting it up. Use **Refresh** to reload the table or **Load Older Deliveries** when more
history is available.

You can also open the webhook indicator in a thread's title bar, or ask Puck:

```prompt
List my active GitHub webhooks. Explain what each one watches and where it
sends events.
```

Puck returns your subscriptions in one list, wherever you created them. You can ask for only
those targeting a particular thread. Only the user a webhook runs as can manage it.

<div class="docs-media-stage">
  <img class="docs-transparent-media" width="1280" style="aspect-ratio: 1280/704" src="https://static.ampcode.com/docs/github-webhooks-puck.png" alt="Puck listing the GitHub subscriptions Amp is following and where each one sends updates" />
</div>

### Stop Receiving Events

Pause a webhook to stop deliveries without deleting its configuration. Resume it to receive
events again. You can give a webhook an expiration time when you ask Amp to create it.

Archiving a receiving thread stops deliveries to that thread. Orb spawners keep running until
you pause or delete them, or their expiration time passes. Closing an issue or PR stops its
automatic comment subscription, not the spawner that created the thread.

## How Orbs Authenticate to GitHub

Amp does not place a long-lived token in the orb. When the orb starts, Amp clones the repository
into `/home/user/workspace/repo`. The credential for that clone
applies only to the clone command and is discarded afterwards.

After that, whenever the agent runs a Git command that talks to GitHub, Git asks a credential
helper, and the helper asks Amp for a short-lived token for your account. This means:

- The agent can fetch, push, and clone any repository on github.com that your connection can
  reach, not only the project's repository.
- The `gh` CLI is preinstalled and gets its token the same way, so `gh pr create` and
  `gh run view` work without `gh auth login`.
- GitHub does not accept image and video uploads made with Amp's GitHub App token, so
  `gh ... --attach` fails in orbs with "unsupported authentication type" or "attaching files
  requires write access to the repository". This is a known GitHub limitation. To put media in
  an issue, pull request, or comment, Amp publishes it at a
  [public URL](/docs/orbs/files-and-attachments#share-generated-files) and embeds that URL in
  the Markdown. If your skills or `AGENTS.md` tell the agent to use `--attach`, ask it to publish
  the media instead.
- SSH URLs such as `git@github.com:owner/repo.git` are rewritten to HTTPS, so SSH keys are not
  needed.
- Each Git command that contacts GitHub asks Amp for a current token. The token is never written to
  disk or included in the project snapshot that later orbs start from.
- Branch protection rules and organization permissions apply exactly as if you had pushed from your
  own machine. In a project that [acts on GitHub as Amp](#act-on-github-as-amp), the token for the
  project's repositories acts as the Amp GitHub App's bot instead.

Threads that run on a [runner](/docs/cli/runners) or in a local CLI session use the Git
configuration and credentials of that machine. Amp does not inject credentials there.

## Commit Identity

A Git identity is the name and email that appear as the author of the commits the agent makes in
orbs. Manage yours under [Settings → Projects → Git Identities](/settings/projects#git-identities).
Your Amp account identity is available by default. To commit under another name and email, click
**Add Identity**. Amp sends a verification link to that email, and the identity becomes usable once
you confirm it.

The identity marked **Default** applies to your personal projects; choose it with **Make Default**. To use a different identity for one
project, choose it under **Your Identity** on that project's page.

Under **Personal Settings → Projects**, choose the **Commit Author** of your personal projects:

- **Amp** makes `Amp <amp@ampcode.com>` the author and adds you as a co-author.
- **You** uses your personal default identity as the author.

When you are the author, **Credit Amp as Co-author** adds Amp as a co-author.

Both apply to every project that doesn't set its own. Until you choose, Amp-hosted projects make
you the author and other projects make Amp the author. In orb threads without a project, you are always the author,
and turning off **Credit Amp as Co-author** omits the Amp co-author. Each project can differ from
the default under **Commit Author** in the project settings.

For workspace projects, workspace admins can choose one **Commit Identity** policy for the whole
workspace under [Workspace Settings → Projects](/workspace):

- **Amp** makes `Amp <amp@ampcode.com>` the author and adds the thread creator as a co-author
  through a `Co-authored-by:` trailer.
- **Amp Account** uses each thread creator's Amp account identity.
- **User Choice** lets each member pick one of their verified identities.

Commits made by a [service account](/docs/collaborate/workspaces#service-accounts) always make
`Amp <amp@ampcode.com>` the author and add the service account as a co-author, whatever the
policy. A service account connected to a GitHub organization commits as Amp without a co-author.

Without a policy, the workspace's **Commit Author** chooses who authors commits in new workspace
projects: Amp, or each member as their Amp account identity.

When you credit Amp as a co-author, the agent adds a
`Co-authored-by: Amp <amp@ampcode.com>` trailer. Turn it on or off for one project with
**Credit Amp as Co-author** in that project's settings. The choice applies wherever the agent
runs, including on [runners](/docs/cli/runners) and in local CLI sessions. On those machines,
[`amp.git.commit.coauthor.enabled`](/docs/cli/settings) set to `false` also omits the trailer.
Commits the agent makes through its shell also carry an `Amp-Thread-ID:` trailer with the
URL of the thread, so anyone reading the Git history can open the conversation that produced the
change.

## Signed Commits

Amp can sign the commits the agent makes in orbs. Amp generates an SSH keypair for you and keeps the
private key encrypted on Amp's servers. Git in the orb calls Amp to sign each commit, so the private
key never enters the orb.

Open [Settings → Projects](/settings/projects#sign-git-commits-in-orbs) and turn on **Sign Git
Commits in Orbs**. Your keypairs are under [Settings → Signing Keys](/settings/keys). Amp signs a
commit with your key only when the selected Git identity uses an email you have verified. Commits
made under the **Amp** identity in a project are signed with Amp's own key instead, whether or not
this setting is on.

<div class="docs-media-stage">
  <img class="docs-transparent-media" width="1752" style="aspect-ratio: 1752/814" src="https://static.ampcode.com/docs/github-commit-signing.png" alt="The Commit Signing settings with the Sign Git Commits in Orbs switch turned on, a default Amp Commit Signing Key, and steps for verified commits on GitHub" />
</div>

For GitHub to show the commits as **Verified**:

1. Click **Copy Public Key** on your default keypair.
2. Open [github.com/settings/ssh/new](https://github.com/settings/ssh/new).
3. Set **Key type** to **Signing Key**, paste the key, and save.

GitHub also requires that the committer email is a verified email on your GitHub account.

## Workspace Controls

Workspace admins can turn the GitHub integration off for the whole workspace in
[Workspace Settings → Integrations & MCP](/workspace). The card also shows how many members have
connected their GitHub account.

<div class="docs-media-stage">
  <img class="docs-transparent-media" width="1752" style="aspect-ratio: 1752/203" src="https://static.ampcode.com/docs/github-workspace-toggle.png" alt="The workspace GitHub integration card with its switch turned on and a note that each member must connect GitHub from their personal integrations" />
</div>

When the integration is off, members cannot connect GitHub, orbs cannot clone private GitHub
repositories, and threads do not show commit or pull request previews. Existing connections stop
working until an admin turns the integration back on.

Each member connects GitHub from their own personal settings. There is no shared workspace token,
so every member only ever gets access to the repositories their own GitHub account can see.

## Use Your Own GitHub App

A workspace can have its members connect through a GitHub App the organization creates, instead of
the Amp GitHub App. Use this when the agent needs permissions the Amp app does not have, when your
organization uses GitHub Enterprise Managed Users, or when your enterprise is on GHE.com with data
residency. A workspace admin turns it on in workspace settings.

Each member still signs in as themselves, through your app. GitHub gives Amp a token for that
member that can do what your app is allowed to do, and only where the member has access. Orbs
use that token for `git` and `gh`, so the agent can use every permission you give the app.

### Set Up the App

1. In [Workspace Settings → Integrations & MCP](/workspace), turn on **Use Your Own GitHub
   App** on the GitHub card. If your enterprise is on GHE.com, turn on **GHE.com Data
   Residency** and enter your host, such as `company.ghe.com`.
2. On github.com or your GHE.com host, create a GitHub App owned by your organization. Set its
   **Callback URL** to the URL the settings show, which is
   `https://ampcode.com/auth/workspace-ghe-cloud/callback` unless your workspace requires a
   custom domain.
3. Give the app the [permissions](#permissions) you want. Leave **Webhook** off for now; Amp
   gives you its URL and secret after you save. You do not need a private key.
4. Install the app on the organizations that own your repositories.
5. Generate a client secret, then enter the app's **Client ID** and **Client Secret** in Amp
   and click **Save**.
6. Each member connects their GitHub account through the app: **Connect My GitHub Account** in
   workspace settings, or **Connect** on the GitHub card in
   [Settings → Integrations & MCP](/settings/integrations).

You can add permissions to the app later. GitHub asks an organization owner to approve them on
each installation, and members' tokens get them once approved. Replacing the app with one that
has a different client ID disconnects every member, and each must connect again. Turning
**Use Your Own GitHub App** off removes the app and every member's connection.

### Permissions

These are the repository permissions Amp needs or uses. Your app needs no account or
organization permissions.

| Permission      | Access         | What Amp uses it for                                                                                       |
| --------------- | -------------- | ---------------------------------------------------------------------------------------------------------- |
| Metadata        | Read           | Required. GitHub adds it to every app. Amp lists the repositories you can pick in **New Project**.         |
| Contents        | Read and write | Required. Orbs clone, fetch, and push branches, and Amp checks that the project's repository is reachable. |
| Pull requests   | Read and write | `gh pr create`, `gh pr view`, and reading and replying to review comments.                                 |
| Issues          | Read and write | `gh issue view` and commenting on issues.                                                                  |
| Actions         | Read           | `gh run view` and CI logs. Choose **Read and write** to let the agent rerun or start workflows.            |
| Checks          | Read           | `gh pr checks` and check results for a commit.                                                             |
| Commit statuses | Read           | Status results for a commit.                                                                               |
| Workflows       | Read and write | Pushing changes to files under `.github/workflows`. GitHub rejects such pushes without it.                 |

Only Metadata and Contents are required. Add any other permission the agent should be able to
use with `gh` or the GitHub API, such as **Commit statuses: Read and write** to post statuses,
**Deployments: Read and write** to create deployments, or **Administration: Read and write** to
create repositories. Leave out any you do not want the agent to have.

For [GitHub webhooks](#github-listeners), turn on your app's webhook so threads can subscribe to
pull request comments, reviews, issues, and CI. The **Webhooks** section that appears after you
save gives you the webhook URL and secret and lists the events to subscribe to. On github.com,
until you generate the webhook secret, Amp watches repositories through the Amp GitHub App
instead, so it must be installed on them.

### Differences from the Amp GitHub App

- Members use GitHub repositories only through workspace projects. Personal projects and threads
  without a project cannot reach them.
- [Act on GitHub as Amp](#act-on-github-as-amp) and service accounts need the Amp GitHub App, so
  they are unavailable.

## Other Git Hosts

GitLab, Bitbucket, and other HTTPS Git hosts work in orbs. You can clone, fetch, commit, and push
without moving your code to GitHub. The GitHub connection does not authenticate to those hosts:

- **GitLab.** [Connect GitLab](/docs/integrations/gitlab#connect-gitlab) in Amp settings, and orbs clone and
  push as you on gitlab.com or a self-managed instance, with `glab` signed in. See
  [GitLab](/docs/integrations/gitlab).
- **Amp-hosted repositories.** Choose **Start From Scratch** when you create a project and Amp
  hosts the repository for you. No setup is needed.
- **Public repositories on other hosts.** Paste the HTTPS URL when you create the project. Amp
  clones it without credentials.
- **Private repositories on other hosts.** The orb needs credentials to clone and push. See
  [Configure Git](/docs/orbs/customizing#configure-git) for saved personal HTTPS Git credentials
  (experimental, when available for your account) or manual configuration. Use a token with write
  access if you want the agent to push. Repository permissions and branch protection still apply.

### Git Access and Provider Integrations

Git access does not include every GitHub integration feature:

- **Ship and Push to Branch work with other hosts.** Both ask the agent to use Git. Only GitHub
  repositories get the extra instruction to report a pull request URL after **Push to Branch**.
  To open GitLab merge requests, use a
  [Custom Ship prompt](/docs/orbs/shipping#write-a-custom-ship-prompt) that runs `glab`, which is
  preinstalled and signed in with your GitLab connection. For Bitbucket pull requests, use a Custom
  Ship prompt with your provider's tools and credentials. The bundled `gh` CLI is for GitHub only.
- **GitHub previews and event subscriptions are GitHub-specific.** Configuring Git credentials
  does not enable GitHub's PR status previews, CI tools, or issue and PR webhooks for another
  host. GitLab has its own merge request, issue, and pipeline reads and
  [subscriptions](/docs/integrations/gitlab#subscriptions) through your GitLab connection. For Bitbucket PRs
  and Pipelines, configure your own API tools or MCP server. Git credentials alone do not provide
  API authentication for those tools.
- **The former Bitbucket Enterprise Librarian integration was removed.** That integration let
  the Librarian search and read Bitbucket Data Center / Server through a workspace connection
  and the `amp.bitbucketToken` setting. It was not orb Git access. You can still clone a reachable
  Bitbucket repository over HTTPS into an orb and have the agent work on the checkout.

GitHub Enterprise Server is not supported.

## Troubleshooting

| Message or symptom                                                          | What to do                                                                                                                                                                                                                                                                            |
| --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| "No GitHub account connected"                                               | [Connect GitHub](/settings/integrations).                                                                                                                                                                                                                                             |
| "GitHub connection appears stale or expired"                                | Click **Reconnect** on the GitHub card. This happens after you revoke Amp's authorization on GitHub.                                                                                                                                                                                  |
| "Amp could not access this GitHub repository"                               | Check that the URL is correct. Then click **Manage** and add the repository to the app installation. For organization repositories, an owner may need to approve the app first.                                                                                                       |
| "Your GitHub account is connected, but repository access is still required" | You authorized Amp but did not install the app. Click **Repositories** and pick the repositories Amp may access.                                                                                                                                                                      |
| "GitHub connection is disabled by your workspace admin"                     | Ask a workspace admin to turn the GitHub integration on in the workspace settings.                                                                                                                                                                                                    |
| `git push` fails with `403 ... Permission to owner/repo.git denied`         | The Amp app is not installed on the account or organization that owns the repository, or the installation does not include it. Click **Manage**, pick that owner, and add the repository. This happens with public organization repositories too, because they clone without the app. |
| A push from the orb is rejected for another reason                          | The push runs as you, so the same rules apply as on your machine. Check branch protection and whether your GitHub account has write access to the repository.                                                                                                                         |
| Commits show as **Unverified** on GitHub                                    | Add Amp's public key as a **Signing Key** on GitHub, make sure the committer email is verified on your GitHub account, and use a Git identity other than **Amp**.                                                                                                                     |
