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 & Cody CLI
    • Sourcegraph GraphQL API
    • Sourcegraph Stream API
  • Help & Support

    • SLAs & Premium Support
    • How to videos
    • Tutorials
    • Sourcegraph Accounts
    • Changelog
    • Technical changelog
    • Releases
  1. Docs
  2. integration
  3. github

GitHub integration with Sourcegraph

You can use Sourcegraph with GitHub.com and GitHub Enterprise.

FeatureSupported?
Repository syncing✅
Repository permissions✅
User authentication✅
Browser extension✅

Repository syncing

Site admins can add GitHub repositories to Sourcegraph.

Repository permissions

Site admins can configure Sourcegraph to respect GitHub repository access permissions.

User authentication

Site admins can configure Sourcegraph to allow users to sign in via GitHub.

Browser extension

The Sourcegraph browser extension supports GitHub. When installed in your web browser, it adds hover tooltips, go-to-definition, find-references, and code search to files and pull requests viewed on GitHub and GitHub Enterprise.

  1. Install the Sourcegraph browser extension.
  2. Configure the browser extension to use your Sourcegraph instance.
  • You can also use https://sourcegraph.com for public code only.
  1. GitHub Enterprise only: Click the Sourcegraph icon in the browser toolbar to open the settings page. If a permissions notice is displayed, click Grant permissions to allow the browser extension to work on your GitHub Enterprise instance.
  2. Visit any file or pull request on GitHub. Hover over code or click the "View file" and "View repository" buttons.

On this page

  1. GitHub integration with Sourcegraph

    1. Repository syncing
    1. Repository permissions
    1. User authentication
    1. Browser extension

Edit this page on GitHub
Questions? Give us feedback