# Connecting To Github With A Deploy Key

**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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
