---
title: "ezgh build connections create"
description: "Connect an EZGH Git repository."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh build connections create

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh build connections create --name n --repository r [--bot b] [--trusted-ref glob]… [flags]
```

Connect an EZGH Git repository (gtr\_… or its name) to the project: pushes to it then run its .ezgh/build.yaml. A GitHub repository is connected in the console, which installs the GitHub App.

Tasks' sandboxes, cache and checks are the work of a Bot. Without `--bot` one is made for the connection, named build-&lt;name&gt;, with SandboxesFullAccess, RegistryFullAccess and GitBuildAccess, and trusted to be used by EZGH Build for this repository; with `--bot` an existing Bot is used as it is. `--trusted-ref` (a full ref glob, repeatable) says which refs may write the cache every ref reads; without it, the repository's default branch.

Part of [`ezgh build connections`](/cli/reference/build-connections).

## Examples

```sh
ezgh build connections create --name app --repository app
ezgh build connections create --name app --repository gtr_4k2m9x0a7qpe --bot build --trusted-ref refs/heads/main --trusted-ref 'refs/tags/v*'
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--bot` | string |  | an existing Bot to run as, instead of making one |
| `--name` | string |  | the connection's name |
| `--repository` | string |  | the EZGH Git repository, by ID (gtr\_…) or name |
| `--trusted-ref` | string, repeatable |  | a full ref glob whose runs are trusted (default: the default branch); repeat for more |

Inherited from parent commands:

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--dir` | string | `.` | the repository's checkout (any directory inside it) |
| `--json` | boolean |  | print JSON, as -o json does |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/build-connections-create/index.mdx
