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 Início Rápido para o 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.

Se você está usando um plano do Copilot para um conta de usuário gerenciada no GHE.com, precisa atualizar algumas configurações antes de entrar. See Using GitHub Copilot with an account on GHE.com.

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.

Se um arquivo tiver sido configurado como conteúdo excluído no GitHub Copilot, o ícone na barra de status terá uma linha diagonal por todo ele. Passe o mouse sobre o ícone para ver uma dica de ferramenta que informa quais configurações aplicaram essa restrição.

Captura de tela do ícone Copilot no VS Code com uma dica de ferramenta para uma exclusão de conteúdo.

Para saber mais, confira Excluding content from GitHub Copilot.

GitHub Copilot content exclusions are not being applied

Content exclusion can be configured at the repository, organization, and enterprise level. The scope of the exclusion is determined by the level at which the rule is set:

  • Os administradores de repositório só podem excluir conteúdo dos próprios repositórios. Isso afeta usuários do Copilot que trabalham nesses repositórios específicos.

  • Os proprietários da organização podem excluir conteúdo para usuários atribuídos a uma estação do Copilot por meio de sua organização.

  • Os proprietários de empresas podem aplicar regras de exclusão a todos os usuários do Copilot da empresa.

A adição ou alteração de exclusões de conteúdo, pode levar até 30 minutos para entrar em vigor nos IDEs em que as configurações já estão carregadas. Você pode aplicar alterações ao seu IDE forçando-o a recarregar as configurações de exclusão de conteúdo. For more information, see Excluding content from GitHub Copilot.

Observação

É possível que o Copilot use informações semânticas de um arquivo excluído se as informações forem fornecidas pelo IDE indiretamente. Exemplos desse conteúdo incluem informações de tipo e definições de focalização para símbolos usados no código, bem como propriedades gerais do projeto, como informações da configuração de build.

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

This error indicates that you do not have a Copilot plan, 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 Copilot from your IDE. Once you've logged out, 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.

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.

Error: "No valid OAuth token detected" in GitHub Copilot na CLI

This error suggests that a classic or fine-grained personal access token might be in use, either via the GITHUB_TOKEN or GH_TOKEN environment variables, or during a gh auth login attempt. GitHub Copilot na CLI currently only supports using the GitHub CLI OAuth app.

For more information, see the Copilot na CLI extension repository.

Error: "Sorry, your request was rate-limited."

This error suggests that you have exceeded the rate limit for Copilot requests. GitHub uses rate limits to ensure everyone has fair access to the Copilot service and to protect against abuse.

Most people see rate limiting for preview models, like OpenAI’s o1 and o3-mini, which are rate-limited due to limited capacity.

Service-level request rate limits ensure high service quality for all Copilot users and should not affect typical or even deeply engaged Copilot usage. We are aware of some use cases that are affected by it. GitHub is iterating on Copilot’s rate-limiting heuristics to ensure it doesn’t block legitimate use cases.

In case you experience repeated rate-limiting in Copilot, contact Suporte do GitHub.

Further reading