Sourcegraph DocsSourcegraph Docs
  • Code Intelligence

    • Cody
    • Code Search
  • Code Management

    • Batch Changes
    • Code Monitoring
    • Code Ownership
    • Code Insights
    • Notebooks
  • Platform

    • Sourcegraph Admin
    • Sourcegraph Cloud
    • Integrations
  • CLI & API

    • Sourcegraph CLI
    • Sourcegraph GraphQL API
    • Sourcegraph Stream API
  • Help & Support

    • SLAs & Premium Support
    • Tutorials
    • Sourcegraph Accounts
    • Changelog
  1. Docs
  2. admin
  3. repo
  4. add

Add repositories (from code hosts) to Sourcegraph

  • Add repositories from a code host (GitHub (Cloud or Self-hosted), GitLab (Cloud or Self-hosted), Bitbucket Server, Bitbucket Data Center, or Perforce)

    • GitHub
    • GitLab
    • Bitbucket Cloud
    • Bitbucket Server / Bitbucket Data Center or Bitbucket Data Center
  • Add repositories by Git clone URLs

  • Add repositories from non-Git code hosts

    • Add Perforce repositories
    • Add JVM dependencies
    • Add Go dependencies
    • Add npm dependencies
    • Add Python dependencies
  • Pre-load repositories from the local disk

Troubleshooting

If your repositories are not showing up, check the site admin Repositories page on Sourcegraph (and ensure you're logged in as an admin). If nothing informative is visible there, check for error messages related to communication with your code host's API in the logs from:

  • Docker Compose and Kubernetes: the logs from the repo-updater container/pod
  • Single-container: the sourcegraph/server Docker container

If your repositories are showing up but are not cloning or updating from the original Git repository:

  • Follow the instructions for troubleshooting a repository that is not being updated

On this page

  1. Add repositories (from code hosts) to Sourcegraph

    1. Troubleshooting
Edit this page on GitHub