16

GitHub Copilot show this error

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

But I have authorized on GitHub

Unauthorized error

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
  • Hey, I'm guessing you're not approved on the wait list. You can check waitlist status on https://github.com/features/copilot/signup – Zane Nov 28 '21 at 01:17

7 Answers7

7

This is the scenario that happened to me.

  1. I have multiple github accounts logged into my vscode.

  2. In that only one account has access to the GitHub Copilot.

So in order to give access to the token for the subscribed GitHub copilot, you should go to

1. Click the Accounts section at the bottom left side of the sidebar with a profile icon

2. Choose the GitHub profile you need to deactivate copilot.

3. Click Manage trusted extensions

4. Untick GitHub copilot/nightly.

Patrick Prakash
  • 500
  • 1
  • 7
  • 17
5

Summary:

If you are trying GitHub copilot for the first time, this error indicates that you are not part of the beta invite list. What you can do is you can join the waitlist (https://github.com/features/copilot/signup) and wait for your chance to try the beta.

If you have already got the invitation, then there was an error connecting to api.github.com to request a token to use the Copilot service.

Full Discussion: https://github.com/github/feedback/discussions/7707

Update: Github Copilot is free until August 22, 2022 (https://github.com/github-copilot/tp_signup)

5

If you were previously using the Copilot limited invitation access, as of June 23, mine got deactivated because Github Copilot will be free only until August 22.
I had to activate my free trial here

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
David
  • 703
  • 11
  • 24
3

To solve this issue follow the below steps.

-First, go to your Github account.

-Go to setting select copilot and click on enable copilot.

-Then select Continue without payment detailsenter image description here

-Then allow and tick the check box. -Now go to IDE and uninstall copilot and again install. then sign in to GitHub.

Vipul Ram
  • 646
  • 5
  • 9
1

I got the same error. In my case my card was expired, but they it didn't tell me that it was. Once I updated my card info it started working.

Justin
  • 2,940
  • 3
  • 25
  • 43
0

There is another open-source alternatives to it called CodeGeeX. The code is available at https://github.com/THUDM/CodeGeeX. Check out the VSCode extension at https://marketplace.visualstudio.com/items?itemName=aminer.codegeex

Also, the model weights can be applied and download.

user1349923
  • 763
  • 1
  • 7
  • 24
-1

If you already got the invitation:

  1. Try signing out of your GitHub account from your IDE.
  2. Disable and re-enable the Copilot extension.
Asef Hossini
  • 655
  • 8
  • 11
  • "Try signing out of your GitHub account from your IDE"...great suggestion, but how? – Fatedx Jun 02 '23 at 17:16
  • @Fatedx In VSCode, in the bottom left corner, there is a user icon. Click on that and you'll see "github-username (GitHub)". If you hover it, there should be a "Sign Out" option. – Asef Hossini Jun 03 '23 at 18:41