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

# Importing private GitHub repositories

> Import private GitHub repos into your skill sources and MCP catalog using your own GitHub credential.

JoyStream can import skills and MCP servers from your private GitHub repositories, not only public ones. It does this using your own GitHub credential — the one you connect in Settings — so you can import repositories that only you or your workspace can see.

## How it works

When you add a GitHub repository as a skill source or an MCP repository and then sync it, JoyStream:

1. Looks up your connected GitHub credential for the relevant workspace.
2. Uses that credential to read the repository from GitHub.
3. Imports the skills or servers it finds.

Your token is used only for that request and is then discarded. It is never stored on the repository record, never written into error messages, and never logged.

You always act as yourself. JoyStream never uses someone else's stored token on your behalf, and never uses a shared platform token as your identity.

## Public and private repositories

Public repositories work with no credential at all.

Private repositories require a connected GitHub credential with the `repo` scope. The standard "Connect with GitHub" sign-in grants only public and basic access, so for private repositories you connect a GitHub personal access token with the `repo` scope.

## What happens when a credential is missing

GitHub returns the same "not found" response for a private repository whether it doesn't exist or you simply can't see it. So when a sync can't read a repository and you have no GitHub credential connected, JoyStream shows an actionable message instead of an opaque error:

```text theme={null}
GitHub credential required.

Connect a GitHub token with 'repo' scope: /settings/connections
```

In the Settings UI this appears as a **Connect GitHub** call to action that links to the connections page. The same signal is available from the CLI with `--json`:

```json theme={null}
{
  "error": "credential_required",
  "provider": "github",
  "required_scope": "repo",
  "connect_url": "/settings/connections"
}
```

If you already have a credential connected and a sync still can't find the repository, the message tells you the repository wasn't found or your token lacks `repo` access to it — so you know to check the token's scope or the repository path.

## Supported sources

GitHub only. Adding a non-GitHub URL, such as a GitLab or Bitbucket link, is rejected with a clear error when you create the source. It won't be silently accepted and then fail later.

Skill sources and MCP repositories behave the same way.

## What this feature does not do

* It does not create a new GitHub login flow. You connect GitHub the same way you connect any other service, in **Settings → Connections**.
* It does not resync on a schedule. You trigger syncs yourself.
* It does not import from providers other than GitHub.

## See also

* [Connect GitHub for private repos](/guides/connect-github-private-repos) — walkthrough.
* [Add skill and MCP repositories](/guides/add-skill-and-mcp-repositories)
