# Connect GitHub

## Prepare the repository

Before connecting:

* **Admin access**: Ensure you have administrative access to the GitHub repository. This level of access is required to [install the Spice.ai GitHub app](https://docs.github.com/en/apps/using-github-apps/installing-a-github-app-from-github-marketplace-for-your-organizations#requirements-to-install-a-github-app-on-an-organization).
* **Matching repository name**: The Spice.ai app and the GitHub repository names **must match**. For example:
  * **Spice.ai app**: [spice.ai/spiceai/demo](https://spice.ai/spiceai/demo)
  * **GitHub repository**: [github.com/spiceai/demo](https://github.com/spiceai/demo)

To quickly set up a new repository, use the [spiceai/spicepod-template](https://github.com/spiceai/spicepod-template) as a starting point:

{% hint style="warning" %}
Make sure to copy app spicepod.yaml contents from the **Code** tab and place it in the root of the repository before linking.
{% endhint %}

## Connect

1. Ensure the repository is set up as per instructions above.
2. In the context of the Spice app to connect, navigate to **Settings,** then click the **Connect repository** button.
3. Follow GitHub App installation instructions.

> Ensure that you select all repositories or specifically the repository you intend to connect.

3. Finally, link the repository to your Spice.ai app.


---

# 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.spice.ai/docs/portal/apps/connect-github.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.
