> For the complete documentation index, see [llms.txt](https://docs.zenlytic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zenlytic.com/authentication-and-security/connecting_to_github_with_a_deploy_key.md).

# Connecting To Github With A Deploy Key

## Commit identity and repository rules

Zenlytic writes to your repo every time a user saves model files from Context Manager. Every commit Zenlytic creates uses a fixed identity:

* **Author:** the email of the Zenlytic user who made the change
* **Committer:** `Zenlytic <hello@zenlytic.com>` on every commit, regardless of who made the change
* **Signature:** none — Zenlytic does not sign its commits

{% hint style="warning" %}
If your organization enforces rules on commit metadata, allow `hello@zenlytic.com` **before** you connect. Otherwise branch creation will succeed but every save will fail — these rules apply to every branch, not only protected ones. That's why creating a branch from Context Manager can succeed (no commit is created yet) while the first save fails (a commit is created).
{% endhint %}

Check these settings in GitHub, at both the organization and repository level (a clean repo-level ruleset doesn't rule out an organization-level one):

| Setting                                    | Where to find it                       | What to do                 |
| ------------------------------------------ | -------------------------------------- | -------------------------- |
| Restrict commit metadata (committer email) | Rulesets                               | Allow `hello@zenlytic.com` |
| Require signed commits                     | Rulesets, or classic branch protection | Disable for this repo      |

Metadata restrictions (including committer email pattern) require **GitHub Enterprise Cloud or Enterprise Server** — this option won't appear under Rulesets on GitHub Free, Pro, or Team.

The push itself still authenticates with the deploy key you install below — your access control is unchanged. Only the commit metadata carries the Zenlytic service identity.

**Symptom if this isn't configured:** "Save Model Files Unsuccessful / Failed to save model" in Context Manager on every branch. The underlying push is rejected with a rule violation naming the committer email `hello@zenlytic.com`.

## Connecting your repository

**Step 1:** In Zenlytic, you'll first go into Settings, then Workspace Settings

![Github Deploy Key 1](/files/xGAMCV2WAmaFCl3e7Lhn)

**Step 2:** Next, find your git repo details (these will be in Github).

Make sure to use the "SSH" format of the git URL. The format looks like `git@github.com:<YOUR_ORGANIZATION>/<YOUR_REPO>.git`, and you can find it here in your Github repo under the "Code" button with the SSH tab as shown below.

![Github Deploy Key 2](/files/bOvXrjlVHk0MZPUgZ45H)

**Step 3:** Now that you have that URL and the branch you want to use as your production branch, return to Zenlytic. In this example, we pasted our Github repo url (SSH format) and our production branch, which was: `master`.

![Github Deploy Key 3](/files/BbdGtyolPCGH4NoLbpL9)

**Step 4:** Next we need to generate the SSH key we'll use to connect. Hit the "Generate Deploy Key" button, then the "Confirm" button, and copy the public SSH key generated.

![Github Deploy Key 4](/files/Wh2atCZCmLasGUDiChYR)

**Step 5:** Then hit Copy Deploy Key.

![Github Deploy Key 5](/files/ZV0fNAgG7FnnSJAFInGE)

**Step 6:** Now that you have the deploy key copied return to Github and go to "Settings."

![Github Deploy Key 6](/files/gP6k7HjC3YMnj6lI8m2J)

**Step 7:** Then go to Deploy Keys in the left-hand menu.

![Github Deploy Key 7](/files/P6Tdq2mOXGjfLDYYT9Jo)

**Step 8:** Then, click "Add new" and give your deploy key a name. Finally, paste that SSH key and click "Add Key."

![Github Deploy Key 8](/files/1G6MVQZJcTxBC5lobMWt)

**Step 9:** Then click "Save" in the Zenlytic UI. If this saves without an error, you can close the window. You're fully connected to Github!

![Github Deploy Key 9](/files/wlCCq8eKjkX1ntVrcrLy)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.zenlytic.com/authentication-and-security/connecting_to_github_with_a_deploy_key.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
