Skip to main content

Troubleshooting common issues with GitHub Copilot

This guide describes the most common issues with GitHub Copilot and how to resolve them.

For questions about the general use of GitHub Copilot, product impact, human oversight, and privacy, see the comprehensive list of GitHub Copilot FAQs.

If GitHub Copilot stops working, check GitHub's Status page for any active incidents.

Unable to use the GitHub Copilot extension in the IDE

We recommend you follow the quickstart guide for GitHub Copilot while setting up GitHub Copilot on your machine. For more information, see "Quickstart for GitHub Copilot."

The GitHub Copilot extension is frequently updated to fix bugs and add new features. It's important to keep your extension up to date because older clients cannot communicate with the GitHub Copilot servers. Update your GitHub Copilot extension on all the machines you have it installed.

For more information about configuring GitHub Copilot in a supported IDE, see "Configuring GitHub Copilot in your environment."

GitHub Copilot not working in some files

If you're using GitHub Copilot with a Copilot Business or Copilot Enterprise license, you may not see code completion suggestions in your editor for some files. This happens when a file is excluded from being used by GitHub Copilot. Content exclusion can be configured by a repository administrator, or by an organization owner.

When a file is affected by a content exclusion setting, GitHub Copilot will not suggest code completion in that file, and the content of that file will not be used to inform code completion suggestions in other files.

If a file has been configured as excluded content for GitHub Copilot, the icon in the status bar will have a diagonal line through it. Hover over the icon to see a tooltip that tells you which settings have applied this restriction.

Screenshot of the Copilot icon in VS Code with a tooltip for a content exclusion.

For more information, see "Configuring content exclusions for GitHub Copilot."

GitHub Copilot content exclusions are not being applied

GitHub Copilot content exclusion settings do not apply to everyone who uses Copilot.

A content exclusion setting only applies to people who have been granted a seat as part of a GitHub Copilot Business or GitHub Copilot Enterprise subscription and are members of the same organization in which the content exclusion is configured. Other users who can access the specified files will not be affected by the content exclusion and will still see code completion suggestions.

After you add or change content exclusions it can take up to 30 minutes for this to take effect in IDEs where the settings are already loaded. You can apply changes to your own IDE forcing it to reload the content exclusion settings. For more information, see "Configuring content exclusions for GitHub Copilot."

Notes:

  • Excluding content from GitHub Copilot is currently in public beta and is subject to change.
  • This feature is supported in Visual Studio, Visual Studio Code, JetBrains IDEs, and neovim. For details of supported JetBrains IDEs, see "Getting started with GitHub Copilot."
  • Excluding content from GitHub Copilot currently only affects code completion. GitHub Copilot Chat is not affected by these settings.
  • Content exclusion prevents Copilot directly accessing the content of excluded files. Copilot may draw information about non-excluded files from semantic information provided by the IDE - for example, type information, or hover-over definitions for symbols used in code. It's possible that the IDE may derive this information from excluded files.

Error: "GitHub Copilot could not connect to server. Extension activation failed"

This error indicates that you do not have a GitHub Copilot subscription, or there was an error connecting to the GitHub API to request a token to use GitHub Copilot.

To request another token from api.github.com, try signing in and out of GitHub Copilot from your IDE. Once you've logged out, GitHub Copilot will prompt you to sign back in.

If you cannot connect to the server, you can create a discussion in our discussion forum. You can include log files from your IDE to help us troubleshoot the issue. For more information on obtaining log files from your specific IDE, see "Viewing logs for GitHub Copilot in your environment."

GitHub Copilot not suggesting multiple lines of code

This is a known issue and our team is working towards a fix. For more information, see this comment on a GitHub Community discussion.

Further reading