> ## Documentation Index
> Fetch the complete documentation index at: https://docs.libraria.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Github

> Upload all the files inside a repository

The Github integration allows you to upload files inside a repository to your knowledge base.

## How do I add files from my Github?

#### Step 1: Adding Github Datasource on Libraria.

1. Go to the **Knowledge Base** of the Library you want to add a knowledge to.
2. Click on the **External Data Sources** tab.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/google-drive/add-docs-1.png" alt="Extenal data sources" />
</Frame>

3. Select **Github**.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/github/git-1.png" alt="Select Github drive" />
</Frame>

4. A window will pop up then click on `Import Github Repos`.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/github/git-2.png" alt="Github integration" />
</Frame>

5. A new window will open for allowing access to your Github account. Click on `Authorize becaoding` to allow access.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/github/git-3.png" alt="Github account" />
</Frame>

6. Once done, you will see that under the **Active Direct Integrations** section, Github is now added.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/github/git-4.png" alt="Actice integrations" />
</Frame>

#### Step 2: Move to Github Tab on Libraria

1. Go back to **Knowledge Base** and click `Add Knowledge`

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/google-drive/add-google-4.png" alt="Add knowledge" />
</Frame>

2. Select **Scrape with links**

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/knowledge/scrape-links.png" alt="Scrape with links" />
</Frame>

3. Select `Github` from the tabs that are in the link section. Log-in with Oauth to the account with your repo.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/github/git-5.png" alt="Github drive tab" />
</Frame>

#### Step 3: Paste your File URL or Repository URL

1. You can simply get the link to your repository or file by copying it from the URL field of your browser.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/github/git-6.png" alt="Repo url" />
</Frame>

2. Paste your repository URL in the field. Click *Add more* if you want to add more URLs.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/github/git-7.png" alt="Pasted url" />
</Frame>

3. Click the `Submit` button. Once submitted, a window will appear showing how much credits you will use and the files that will be added to your knowledge base.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/github/git-8.png" alt="Submit" />
</Frame>

4. Click on the `Submit` button in the window to confirm and add it to your library.
