Skip to main content

Using GitHub Copilot in GitHub Codespaces

You can use GitHub Copilot in GitHub Codespaces by adding the extension.

Note: Using GitHub Codespaces with JetBrains IDEs is currently in public beta and is subject to change.

Using GitHub Copilot in the VS Code web client

GitHub Copilot, an AI pair programmer, can be used in any codespace. For more information, see "About GitHub Copilot."

To start using GitHub Copilot in GitHub Codespaces, install the GitHub Copilot extension from the Visual Studio Code Marketplace.

To include GitHub Copilot, or other extensions, in all of your codespaces, enable Settings Sync. For more information, see "Personalizing GitHub Codespaces for your account." Additionally, to include GitHub Copilot in a given project for all users, you can specify GitHub.copilot as an extension in your devcontainer.json file. For information about configuring a devcontainer.json file, see "Introduction to dev containers."

Further reading

Using GitHub Copilot in Visual Studio Code

GitHub Copilot, an AI pair programmer, can be used in any codespace. For more information, see "About GitHub Copilot."

To start using GitHub Copilot in GitHub Codespaces, install the GitHub Copilot extension from the Visual Studio Code Marketplace.

To include GitHub Copilot, or other extensions, in all of your codespaces, enable Settings Sync. For more information, see "Personalizing GitHub Codespaces for your account." Additionally, to include GitHub Copilot in a given project for all users, you can specify GitHub.copilot as an extension in your devcontainer.json file. For information about configuring a devcontainer.json file, see "Introduction to dev containers."

Further reading

Installing GitHub Copilot in your JetBrains IDE

GitHub Copilot, an AI pair programmer, can be used in any codespace. For more information, see "About GitHub Copilot."

To use GitHub Copilot in a codespace in your JetBrains IDE, install the GitHub Copilot plugin from within your codespace.

Note: You must install the GitHub Copilot plugin each time you create a new codespace.

  1. In the JetBrains client application, open the Settings (Windows/Linux) or Preferences (Mac) dialog box:

    • Windows/Linux: Click File and then Settings (or press Ctrl+Alt+S)
    • Mac: Click JetBrains Client in the MacOS menu bar, then click Preferences (or press command+,)
  2. In the left-side menu of the Settings/Preferences dialog box, click Plugins On Host. Then click the Marketplace tab.

    Screenshot of the Marketplace tab for 'Plugins On Host'

  3. In the search box, type "copilot" then click the Install button for the GitHub Copilot plugin.

    Screenshot of the GitHub Copilot plugin

  4. Click Accept on the "Third-Party Plugins Privacy Note" dialog box.

  5. Click Restart IDE.

    Screenshot of the GitHub Copilot plugin

  6. Click Restart when prompted to confirm that you want to restart the backend IDE that's running remotely. The JetBrains client application will close when you do this.

  7. Open the codespace again from the JetBrains Gateway application. For more information, see "Using GitHub Codespaces in your JetBrains IDE."

  8. After your JetBrains IDE has restarted, click the Tools menu. Click GitHub Copilot, then click Login to GitHub.

    Screenshot of the JetBrains Tools menu

  9. In the "Sign in to GitHub" dialog box, to copy the device code and open the device activation window, click Copy and Open.

    Screenshot of the device code copy and open

  10. A device activation window will open in your browser. Paste the device code, then click Continue.

    • To paste the code in Windows or Linux, press Ctrl+v.
    • To paste the code in macOS, press command+v.
  11. GitHub will request the necessary permissions for GitHub Copilot. To approve these permissions, click Authorize GitHub Copilot Plugin.

  12. After the permissions have been approved, your JetBrains IDE will show a confirmation. To begin using GitHub Copilot, click OK.

    Screenshot of the JetBrains IDE permissions confirmation

Further reading