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

# GitHub Integration

> Connect GitHub to import repositories and sync your workflow

## Overview

VibeHub integrates with GitHub to make it easy to import your existing repositories. Connect your GitHub account to import both public and private repos with full commit history.

## What You Can Do

| Feature              | Description                                            |
| -------------------- | ------------------------------------------------------ |
| Import public repos  | Import any public GitHub repository                    |
| Import private repos | Import your private repositories (requires connection) |
| Preserve history     | Keep your commit messages, authors, and timestamps     |
| One-time import      | Bring repos into VibeHub for AI-native development     |

## Connecting GitHub

<Steps>
  <Step title="Start an Import">
    Click **Import from GitHub** on your dashboard
  </Step>

  <Step title="Connect Account">
    If importing a private repo, click **Connect with GitHub**
  </Step>

  <Step title="Authorize VibeHub">
    Grant VibeHub read access to your repositories
  </Step>

  <Step title="Complete">
    You're connected! Your GitHub username appears in settings.
  </Step>
</Steps>

<Note>
  For public repositories, you don't need to connect your GitHub account. Just paste the URL and import.
</Note>

## Permissions Requested

VibeHub requests minimal permissions:

| Permission               | Purpose                         |
| ------------------------ | ------------------------------- |
| Read repository contents | To import your code and commits |
| Read user profile        | To identify your GitHub account |

We **never** request:

* Write access to your repos
* Access to your GitHub issues or PRs
* Access to your GitHub settings

## Managing Your Connection

### Viewing Connection Status

To check if GitHub is connected:

1. Go to VibeHub **Settings**
2. Look at the **Connected Platforms** section
3. GitHub will show as "Connected" with your username

### Disconnecting GitHub

To disconnect your GitHub account:

1. Go to VibeHub **Settings**
2. Find GitHub in **Connected Platforms**
3. Click **Disconnect**

<Warning>
  Disconnecting won't affect already-imported projects. It only prevents new imports of private repositories.
</Warning>

## Importing Repositories

Once connected, importing is straightforward:

1. Click **Import from GitHub**
2. Paste your repository URL
3. Preview the repository details
4. Click **Import**

See [Importing from GitHub](/projects/importing-from-github) for detailed instructions.

## What Gets Imported

| Content                    | Imported |
| -------------------------- | -------- |
| Source code                | Yes      |
| Commit history (up to 100) | Yes      |
| Commit messages            | Yes      |
| File structure             | Yes      |
| Default branch             | Yes      |

## One-Way Sync

Currently, VibeHub import is **one-way**:

* GitHub → VibeHub: Import repositories
* VibeHub → GitHub: Not supported (yet)

Your imported project becomes an independent VibeHub project. Changes in GitHub won't automatically sync to VibeHub, and vice versa.

## Security

### Token Storage

Your GitHub OAuth token is:

* Encrypted at rest
* Never shared with third parties
* Only used to read repository data

### Revoking Access

To fully revoke VibeHub's access:

1. Disconnect in VibeHub settings
2. Go to GitHub → Settings → Applications
3. Find VibeHub and click **Revoke**

## Troubleshooting

### Can't See Private Repos

If private repositories don't appear:

1. Verify GitHub is connected
2. Check you authorized the correct account
3. Try disconnecting and reconnecting

### Authorization Failed

If the OAuth flow fails:

1. Clear browser cookies
2. Make sure you're logged into the correct GitHub account
3. Try again in an incognito window

### Import Taking Too Long

Large repositories take longer to import. The process continues in the background - check back in a few minutes.

## Future Features

We're working on:

* Two-way sync with GitHub
* Multiple branch import
* GitHub Actions integration
* Pull request creation from VibeHub

## Next Steps

<CardGroup cols={2}>
  <Card title="Import a Repository" icon="download" href="/projects/importing-from-github">
    Bring your GitHub projects to VibeHub
  </Card>

  <Card title="Create a Project" icon="folder-plus" href="/projects/creating-projects">
    Start fresh with a new project
  </Card>
</CardGroup>
