> For the complete documentation index, see [llms.txt](https://docs.hivel.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hivel.ai/integrations/version-control/github-cloud/github-cloud-using-oauth/how-to-integrate-github-with-account-wide-access.md).

# How to integrate GitHub with account wide access?

#### Data Access by Hivel

* Hivel accesses the past 60-90 days of commits and pull requests from active repositories during the initial sync.

#### Authorization Mechanism

* Hivel employs GitHub's OAuth for authentication.
* Users maintain full control and can withdraw access anytime via GitHub's authorized apps section.

#### Requirements

* Ensure to log in with an account possessing write permissions to relevant GitHub repositories.
* Write permissions are mandatory for webhook publication, facilitating real-time data sync.

#### Best Practice

* Opt for a service account rather than an individual-linked account.
* Service accounts are typically overseen by the company's admin.\ <br>

**Permissions Required**

<figure><img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FfuGFYrIfn5oKmyDnw7jx%2Fimage.png?alt=media&amp;token=0c265b13-9ca8-453d-aac0-66fa167d5b25" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
**You can either create a service account or use one with access to only the required workspaces.**
{% endhint %}

### How to create a service account and give access to the required workspaces

{% hint style="info" %}
Skip this section if you are using an existing account with required access.
{% endhint %}

1. Sign up on [<mark style="color:purple;">github.com</mark>](https://github.com/) using a generic email ID which does not belong to any developer and can be accessed by the admin.
2. Once created, open the required workspace using an admin account.
3. Under **People** section, click on **Invite member** to invite the newly created service account.
4. Do the same for **all the required workspaces**.
5. Once invited, log into the account mail and **accept the invite**. This will give the service account permission for only the required workspaces.<br>

   <figure><img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FDmotpSsSvrB8r1MBb0T5%2Fimage.png?alt=media&amp;token=c92a0ff2-6213-4940-bce6-63d9ae5057d8" alt=""><figcaption></figcaption></figure>

### **Sign in to Hivel**

1. Navigate to the Hivel [<mark style="color:purple;">sign-up page</mark>](https://app.hivel.ai/signup)

2. Add your work email id (If you'd like to use your personal email id please contact [<mark style="color:purple;">support@hivel.ai</mark>](mailto:support@hivel.ai)

3. Now, you can use your Google or Microsoft login with your work email id; or create a password.

4. Create your Company Profile, and click '**Get Started**'.<br>

   <figure><img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FxUR7gm8ZeDx43pdfMQtz%2Funknown.png?alt=media&amp;token=db335ff6-956f-440e-974b-29e0a6f8a640" alt=""><figcaption></figcaption></figure>

5. Once you've successfully created your Company Profile you will be redirected to the Integrations Page under **Settings.**<br>

   <figure><img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FBmr0wKVXridd3vsOMGf0%2FScreenshot%202026-08-18%20at%205.28.40%E2%80%AFPM.png?alt=media&amp;token=bcb84e79-eca3-470e-a077-ac43462fb941" alt=""><figcaption></figcaption></figure>

6. Select GitHub, and use your company's GitHub account (**either service account or the account which has access to the required workspaces**).

7. Click on **Connect.**<br>

   <figure><img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FqAaYJflTVUz4CqIzqZEM%2FScreenshot%202026-08-18%20at%205.31.43%E2%80%AFPM.png?alt=media&amp;token=bf794bb6-490f-4c0b-973c-cbe797a1bb46" alt=""><figcaption></figcaption></figure>

   <br>

#### Integration Options

There are two integration options to choose from:&#x20;

* **Account-Wide Access** and&#x20;
* **Repository-Level Access**.&#x20;

Account-Wide Access is selected **by default**.

**Account-Wide Access** (default)

* Access for your service account
* Connect all repositories you already have access to.

Check **"Please verify you are an Admin to proceed"** to enable the **Integrate Github** button.&#x20;

<figure><img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FlHipfNyPQZ3rVD2P2Wlh%2FScreenshot%202026-08-18%20at%205.58.02%E2%80%AFPM.png?alt=media&amp;token=a611352d-334f-4129-be00-40a21828cf9c" alt=""><figcaption></figcaption></figure>

1. Click '**Integrate Github**' .

2. Make sure you click on '**Grant**' all the organization you want to integrate with Hivel.\ <br>

   <figure><img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FhqkNBgy8OVtUGxOWy10H%2Fimage.png?alt=media&amp;token=31cb29df-456e-4635-a852-fe8950a24d72" alt=""><figcaption></figcaption></figure>

3. After authorization, you'll be redirected back to Hivel.&#x20;

Once your GitHub is successfully integrated, we will start to pull data. It will take between 2 - 48 hours for the complete sync, depending on the volume of the data.
