> For the complete documentation index, see [llms.txt](https://help.usehaystack.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.usehaystack.io/setup/integrations/github-cloud.md).

# GitHub Cloud

{% hint style="info" %}
For more information on what data Haystack uses from Git, [here is an article!](/admin/security-and-privacy.md)
{% endhint %}

## Configure

{% tabs %}
{% tab title="Update integration" %}
{% hint style="info" %}
Default token would give a sync time of 30 minutes.

To improve the sync time to 10 seconds check [Real Time Data Sync](broken://pages/AFrpWnNzXLWNlfYFY9ca) doc.
{% endhint %}

1. Go to [Org settings -> Integrations -> Version Control](https://delivery.usehaystack.io/integrations/version-control).
2. Select `Connect GitHub -> GitHub Cloud`.
3. You will be redirected to GitHub connect page. Select which GitHub account to integrate to Haystack:

   <figure><img src="/files/C8hyKxhNeomVdEBhMyaP" alt=""><figcaption></figcaption></figure>
4. Select repositories. If you select specific repositories, you will have to give access to all newly created repositories later on:

<figure><img src="https://downloads.intercomcdn.com/i/o/254980857/b39ee9adafdcf09bc61f18b5/select-repos.gif" alt="" width="563"><figcaption></figcaption></figure>

5. **Redirection:**
   1. **You have permission to give access GitHub. I**f you see the above page, press "Continue" and move to Step &#x38;**:**

      <figure><img src="/files/Qfh9T1zggZzsj1nNRaDv" alt=""><figcaption></figcaption></figure>
   2. **Need approval from GitHub Admin.** If you don't have admin permissions in GitHub, you will need to receive approval from your GitHub admin and enter a token to link Github with Haystack:

      <figure><img src="/files/io6GpjCu8hkp9BW6rXZY" alt=""><figcaption></figcaption></figure>

      The GitHub admin will receive an email from GitHub to grant access to the organization. After they do it, they will be redirected to the Haystack page with the token:

      <figure><img src="/files/9l1VKBDty5EKKd57HV7w" alt=""><figcaption></figcaption></figure>

      **Important**: Inform the GitHub admin in advance not to close the page before copying the token. If they close the page, they will need to uninstall the Haystack app from Github and you will need to start Github integration from scratch.
6. Wait for the data to sync. This usually takes about 4 hours, but due to GitHub API limitations can extend up to 24 hours depending on the organization size.
   {% endtab %}
   {% endtabs %}


---

# 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://help.usehaystack.io/setup/integrations/github-cloud.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.
