> For the complete documentation index, see [llms.txt](https://village-labs.gitbook.io/coworker-product-and-developer-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://village-labs.gitbook.io/coworker-product-and-developer-docs/data-connections/github.md).

# Github

How to connect your Github account with Coworker.

### Prerequisites

* A Github account with access to the repositories you wish to sync with Coworker.

### Generating the credentials

1. Go to your Github developer settings to create a new Personal Access Token\
   <https://github.com/settings/tokens>
2. Create a new classic token<br>

   <figure><img src="https://3561055466-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fcl1KIMhPQkmG41x5eGvL%2Fuploads%2FB6RGAlgv5V5q4kr81K4r%2FScreenshot%202024-03-19%20at%2011.46.26.png?alt=media&amp;token=13d18bd2-1e43-4845-ae4c-e1f951c056ad" alt=""><figcaption><p>Click "Generate new token (classic)"</p></figcaption></figure>
3. Set the token Note to Village Access Token, and set the Expiration to No Expiration (note that this token can always be manually revoked in Github in future, but setting a custom expiration date will require this entire process to be re-run once the expiration date is hit).
4. Check the following boxes.

   <figure><img src="https://3561055466-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fcl1KIMhPQkmG41x5eGvL%2Fuploads%2FzlUECYT4GjovoJ2uhrBF%2FScreenshot%202024-03-19%20at%2011.51.08.png?alt=media&amp;token=b9ea094f-b55c-4bf6-9e85-09b25ceb56ca" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://3561055466-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fcl1KIMhPQkmG41x5eGvL%2Fuploads%2FBIvKtv84jyvL6JzGzJpN%2FScreenshot%202024-03-19%20at%2011.51.43.png?alt=media&amp;token=67caffd4-1116-42ed-8185-60091561087d" alt=""><figcaption></figcaption></figure>
5. Copy your token and store it in a secure place (like 1Password, LastPass or Bitwarden).<br>

   <figure><img src="https://3561055466-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fcl1KIMhPQkmG41x5eGvL%2Fuploads%2FNxVgOclQxlNEqRqaBcXo%2FScreenshot%202024-03-19%20at%2011.53.07.png?alt=media&amp;token=1996fd6c-0991-4fa7-9d2f-1a2eb5a69a28" alt=""><figcaption></figcaption></figure>

### Information required for the Coworker connection:

Please share the following information with the Coworker team via a secure connection (eg. 1Password, LastPass or Bitwarden).

* `access_token`: The access token created above
* `repository`: A comma-separated list of repositories that Coworker should monitor, prefixed with the username/organization (there should be no spaces) eg. `seriouscorp/FizzBuzzEnterpriseEdition,seriouscorp/AbsoluteAGI`&#x20;
* `start_date`: Date of the first record to synchronize, in a ISO8601 format (eg. `2024-01-01`) . Commits before this date will not be synchronized.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://village-labs.gitbook.io/coworker-product-and-developer-docs/data-connections/github.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
