# GitHub Enterprise Server & Generic Git

> **Availability notice:** Self-serve onboarding in [app.membl.io](https://app.membl.io) currently focuses on **GitHub.com** (`Settings -> Connections`). GitHub Enterprise Server (GHES) and Generic Git connections are paused for general self-serve. [Contact us](/contact) if your team needs GHES or Generic Git access.

membl supports **GitHub.com** today, with **GitHub Enterprise Server (GHES)** and **Generic Git (SSH / HTTPS)** available when multi-forge access is enabled for your workspace.

<Cards>
  <Card title="Multi-Forge Overview" href="/docs/multi-forge">
    All 7 supported forge families and execution modes.
  </Card>

  <Card title="Workflow Schema v1" href="/docs/workflow-schema">
    Full reference for 

    `.membl/workflows/*.yml`

     native pipelines.
  </Card>

  <Card title="Source Control Security" href="/docs/source-control-security">
    Strict HTTPS, SSRF protection, Ed25519 deploy keys, and egress allowlists.
  </Card>
</Cards>

## GitHub & GitHub Enterprise Server (GHES)

### GitHub.com

Install the Membl GitHub App from **Settings -> Connections** (or during onboarding) and update `runs-on` in `.github/workflows/*.yml` to `membl-x64` (or `membl-arm` for Linux Arm64), or enable native `.membl/workflows/*.yml`.

### GitHub Enterprise Server (GHES)

For self-hosted GHES instances reachable over HTTPS:

1. Open **Settings -> Connections -> Source Control** and select **GitHub Enterprise Server**.
2. Provide your GHES HTTPS base URL (configured as `api_base_url` on the connection) and complete the GitHub App manifest flow for your GHES organization.
3. Verify reachability with **Test Connection**. membl validates the endpoint against strict HTTPS and SSRF/DNS-rebinding rules and adds your GHES hostname to your workspace egress allowlist automatically.
4. Route existing `.github/workflows/*.yml` jobs by setting `runs-on: <your-membl-label>`, or run native `.membl/workflows/*.yml` workflows with GHES Check Runs.

***

## Generic Git (SSH / HTTPS) + Signed Webhooks

For Git servers without a dedicated CI runner daemon, including Gerrit, Sourcehut, Harness, cgit, AWS CodeCommit, or custom self-hosted Git servers, membl runs **native `.membl/workflows/*.yml` pipelines** triggered by signed webhooks.

<Steps>
  <Step>
    ### 1. Add a Generic Git connection

    Open **Settings -> Connections -> Source Control** and choose **Generic Git**. Choose your clone authentication method:

    * **HTTPS + token**: Supply an HTTPS repository URL and read token (or import a 1Password `op://` reference).
    * **SSH deploy key**: Supply the Git SSH URL and pair the generated Ed25519 deploy key with read access on your Git server.
  </Step>

  <Step>
    ### 2. Configure the HMAC webhook endpoint

    membl provides a dedicated connection webhook endpoint and HMAC-SHA256 secret on your Source Control connection card:

    ```text
    POST https://app.membl.io/api/git/webhook/{connectionId}
    ```

    Configure your Git server or hook script to compute an HMAC-SHA256 digest over the raw UTF-8 JSON request body and send it as hex (`sha256=<hex>`) in the signature header shown on your connection card:

    ```bash
    payload='{"ref":"refs/heads/main","after":"<40-char-commit-sha>"}'
    sig=$(printf '%s' "$payload" | openssl dgst -sha256 -hmac "$MEMBL_WEBHOOK_SECRET" | sed 's/^.* //')
    curl -fsSL -X POST "https://app.membl.io/api/git/webhook/${CONNECTION_ID}" \
      -H "Content-Type: application/json" \
      -H "X-Hub-Signature-256: sha256=${sig}" \
      -d "$payload"
    ```

    membl verifies the HMAC-SHA256 signature in constant time before cloning or queuing any job, and automatically adds your Git host to your workspace egress allowlist.
  </Step>

  <Step>
    ### 3. Add `.membl/workflows/ci.yml`

    Commit a declarative workflow under `.membl/workflows/ci.yml`:

    ```yaml
    version: 1
    name: CI

    on:
      push:
        branches: [main]

    defaults:
      compute:
        intent: balanced

    jobs:
      test:
        name: Test
        cache: [pnpm]
        steps:
          - uses: checkout
          - run: pnpm install --frozen-lockfile
          - run: pnpm test

      ci:
        name: CI / ci
        type: gate
        needs: [test]
    ```
  </Step>
</Steps>

## What you get on every Generic Git run

* **Single-use Linux x64 sandboxes** (2 or 4 vCPU, 8 GB RAM) destroyed immediately after job completion.
* **In-place block-overlay caches** on membl runners scoped per repository.
* **Per-second billing** with `$0.00` queue and boot time and itemized per-job dollar receipts. Review rates on [/pricing](/pricing) or read [Source Control Security](/docs/source-control-security).

