I have installed GitHub Copilot just for the sake of testing. However, none of the commands work.
For example if I try CTRL + Enter I get this error message:
command 'github.copilot.generate' not found
I am trying it with JS file.
I have latest Visual Studio Code and Copilot installed.
Click on the bell button on bottom right-corner of the Visual Studio Code Editor
Press 'Agree' button
Thats it!
I had already signed up for the Technical preview and also accepted the invite for the same. Even after being signed in to VS Code using the same account, I had this error. This solution worked for me:
Sign out of my account from the Accounts section of the left
sidebar on VS Code
Sign in again using the same account in which invite was received
NOTE: There is a thread on the official Copilot discussion board on this issue here.
I have access to Github Copilot as well but get the error:
command 'github.copilot.generate' not found
Tried reloading and reinstalling it as well through vscodes ui.
Went in and manually went through the process of completely deleting it explained here.
Afterward, I logged out of my Github account attempted to install Copilot then logged back in when the prompt was displayed, again no luck.
Tested running both CTRL+ENTER and Alt+\ , neither of them did anything.
After I tried:
Developer: Reload Window
But that didn't do anything.
Checked the discussion forums and they had a solution for:
command 'github.copilot.toggleCopilot' not found
Which was to simply uninstall then reinstall copilot then run CTRL+R (Developer: Reload Window), this too didn't work out.
There's a good chance that all you'd have to do is retrigger the authentication flow considering that the developer tools console reports that copilot is "missing an auth token" (but no one knows how to retrigger it).
In addition to the above, I tried running CTRL+SHIFT+P then ran "Open Copilot", which resulted in the error
Command 'Open Copilot' resulted in an error (command 'github.copilot.generate' not found)
From this discussion post on another forum with a similar issue, apparently, this is an issue with command registration.
This specific comment seemed most relevant
Uninstall Python extension (if you have pylance uninstall it first).
Close all instances of VS Code.
Go to,%USERPROFILE%/.vscode/extensions (on windows) or
~/.vscode/extensions on Linux/Mac.
Delete any folder with the name starting with ms-python.python*
Start VS Code, and install Python extension (also pylance if you
uninstalled it in step 1).
Of course, you'd have to apply this to Copilot so...
Uninstall Copilot
Close all instances of vscode
Go to, %USERPROFILE%/.vscode/extensions (on windows) or ~/.vscode/extensions on Linux/Mac.
Delete all instances of Copilot
Go to, %USERPROFILE%/AppData/Roaming/Code/CachedExtensionVSIXs
Delete all instances of Copilot
Start and install Copilot
This too didn't work.
If I were to guess this would be solvable via retriggering the authentication flow.
(1) Go to, %USERPROFILE%/AppData/Roaming/Code/CachedExtensionVSIXs
(2) Delete all files and reopen vsCode.
This happens when you have failed to authenticate Copilot with Visual Studio Code.
If you had a missed authentication flow the flow can be re-triggered by clicking the VSCode Notifications icon on the status bar and clicking on the Sign in to Github notification.
If you have lost the authentication flow notification from the notifications panel, re-installing the Copilot helps.
TIP: To make it easier to sign in, make sure you are already authenticated on github.com on the default browser.
You can open the extensions tab or press ctrl + shift + x to look at the copilot extension.
you may reload it if you have authenticated with your GitHub account before.
Step 1:
First you need to login with same Github account you use for copilot beta signup, in your default browser.
If you mistakenly did something wrong here, just uninstall the extension and reload it, and then repeat step 1.
I don't know how this ties in but maybe it will help.
I have several times gotten a page saying that Copilot installed but wasn't done yet, and that I could finish the process by pasting an auth code into the "sign on to Github" link found in the VSCode status bar.
No such sign-on link ever showed up in my status bar but the auth code looked like this:
vscode-insiders://vscode.github-authentication/did-authenticate?windowid=1&code=65....
but I have found no place I can run that where it produces the desired result. At best I end up back at the waitlist sign on page.
Just log out your github account and re-log-in it in VSCode
In OSX this worked:
On a previous try, I had logged in to the wrong GitHub account. Be sure to be logged in with the correct GitHub account in the browser. Delete the extension from VSCode. Then open the Keychain Access -app and delete GitHub keys from there. After that install the extension and now it gets the correct authorization.
I found that the reason was because my account never prompted me to allow the access as one of the top answers shows. It may have something to do with a firewall or other permissions (or bugs) on your machine. If you have access to another computer you can try to use Co-Pilot and see what happens. For me, everything worked on the second computer. Then you could compare and see what is different. In my case, it was my work's VPN that didn't allow. Once I disconnected from the VPN or tried another device, it worked fine.
Check if you behind a firewall or proxy
Have you got the copilot beta? If not, you cant use it!
Updating Github Copilot helped (for NVim + Vundle I did :BundleUpdate).
Related
Yesterday, VSCode (1.67.1) decided that it was unable to start (crashes immediately) and spits out the error code -1073741818. I have the option to reopen or close but nothing happens regardless of the option chosen. Thought it might be an issue with the file/folder I was opening but no success opening any files/folders at all. Tried to disable GPU, disable extensions and re-install but all lead to the same error code. Tried to move to Atom, but, oddly enough, the same issue occurred. Discovered Atom and VSCode are both based on Electron and that Electron has previously had issues with Nvidia drivers (currently running 512.77) so I tried to install previous versions of the drivers that were working but no success. I finally gave up and moved the code to another system and everything works flawlessly.
So now I that I have some time, I am trying to figure out what went wrong and where to go from here. My uninformed, uneducated guess is it is driver related but I am not sure how to resolve it. I was able to successfully use VSCode earlier in the day with no issue. The system went into stand-by mode and upon return, the issue began. Any suggestions/guidance on where to start would be greatly appreciated.
VSCode Crash Window
Welcome to the community! I think this is caused by an corrupt installation of vscode, try to restart your computer and maybe reinstall vscode by going to, https://code.visualstudio.com.
If that does not help maybe try to submit an issue on the vscode github here: https://github.com/microsoft/vscode.
How to submit an issue on github:
Find the menu bar where it has multiple menus, it should have: "code", "pull requests" and "issues".
Click on "issues" button.
Click "new issue" to create an issue.
Then click "bug report" and enter details to file issue.
Once ready click submit issue to submit your issue in github.
Also, you'll need a github account to create a issue, signup here: https://github.com/
I hope this helps!
Please check if you've installed any additional extensions which may be causing the VSCode to crash.
My VS code keeps crashing when opening it
I had the same problem. First, it used to crash once every 10 minutes, then it started crashing 10 times a minute after a few hours. It just stopped working that day.
I don't know how it was resolved but it did automatically resolve.
I searched for the solution but the VS code on GitHub was already closed. If applicable take a rest and let your PC calm down also. Then if the problem doesn't get resolved, try contacting the developer team.
I have been using copilot for a while now, and one fine day on opening VSCode this error appeared.
"[ERROR] [default] [2022-04-09T08:38:10.995Z] GitHub Copilot could not connect to server. Extension activation failed: "certificate has expired"
I looked up for it everywhere and found nothing, it'd be a great help if someone could fix this for me!
[here's the error and how the extension looks like on the status bar]
Three common causes:
An out of date IDE. Solution: make sure your IDE is up to date
If you're not properly signed in to GitHub CoPilot. Solution: make sure you're signed in to GitHub CoPilot
E.g. In VSCode look on the bottom left, if you see this, you might not be signed in:
Click the icon, and follow the prompts to sign in, then CoPilot should work.
Try closing and reopening your IDE (e.g. vscode), that may also help.
I know its a bit late. But I encountered this problem today. If disabling and restarting doesn't help, you could try:
At uninstall, select Install another version, and select the version before the latest
Reload vscode
After doing this, my copilot started working again.
Two things you should check:
1=> Update VSCode to the latest version
2=> Update GitHub Copilot latest version
From the Menubar, go to View -> Output;
Choose GitHub Copilot from the pulldown on the left to see the log of what is going on in the background.
Go to your Github account and check if you have paid the bill, In my case that was the problem.
In Visual Studio, if you are the one that disabled the Copilot before you can enable the following way.
Either search for "Copilot".
Or go to Tools>>Options>>GitHub>>Copilot
Go to Enable Globally and change from false to True.
Given that GitHub Copilot is so fresh and well-liked, updates are made often. When encountering this kind of problem, I would advise entirely purging and reinstalling.
Installation of GitHub Copilot in Visual Studio Code
The documentation lists extensions for Visual Studio Code, Visual Studio, Neovim, and the JetBrains suite as IDEs that GitHub Copilot supports.
The installation consists of three main steps:
Create a GitHub account (if you don’t have one already).
Go to GitHub Copilot and click on “Start my free trial”. Follow the sign-up steps and make sure to cancel before your 60-day free trial is up (if you don’t want to continue using the tool).
Install the VSCode extension by searching for “GitHub Copilot” on the extensions tab. You’ll be asked to sign in to GitHub, authorize the extension, and then Copilot will be set up.
If you would like a more thorough explanation, my colleague Rafael wrote a great article based on his time with Copilot and VSCode: https://www.scalablepath.com/full-stack/ai-pair-programming-github-copilot-review
I'm noticing this repeatedly with VS2022. Everything starts off well but eventually it seems to lose my authorization on my Azure DevOps project.
I open a solution and VS 2022 connects to Azure Devops. Maybe I make a commit or two and type the little hashtag ('#') symbol in the comment box and sure enough, the list of available work-items appears for me to associate with the checkin. Things are great.
But eventually, that stops working. Nothing appears when I hit the hashtag. So I go to the Team Explorer window and I see this message at the top:
TF30063: You are not authorized to access dev.azure.com/<mycompanyname>.
I try reconnecting through Team Explorer but it doesn't do anything. But if I restart Visual Studio, I'm all connected again. For a while until it happens again.
Anyone have this or know how to fix it? It does not happen to me with VS2019
Experienced the same problem was well. By accident I switched VS 2022 from the embeded to the system browser (Options->Accounts) and after restarting VS 2022 it worked well, however it can be a coincidence:
Just to put a bookend on this, Dan Schulte of Microsoft has officially responded in this thread (see his Dec 14 reply) that they've found the root cause of this problem and have created a fix for it but that the fix won't be released until January.
Apparently it was pretty low level and very hairy and affected not just VS2022 but also previous version. It was something that none of the lists workarounds could truly fix. So I wouldn't bother running repair on your VS install or any of that. It won't fix it.
I had same problem and solved by following this:
restart OS;
open Visual Studio Installer;
on Visual Studio 2022 item, click "Other" button, then "Repair".
that's all.
after updating the version to 17.0.5 its problem was solved.
None of the other methods above worked for me. I tried this in visual studio 2022 and it worked.
Open the Developer PowerShell (View > Terminal) and type in the following:
TF vc permission
This will bring up a login screen and allow you to log in. After that you should have permission, after restarting Visual Studio.
The preferred answer (Andreas Schneider) almost worked for me. I needed the additional step to reenter my credentials under the Azure Service Authentication. Underneath the 'Choose an account' button there was a clickable warning symbol prompting me to re-enter my credentials. After doing that and restarting Visual Studio, I was able to access out azure package resources again.
Today npm started to act up when I executed npm i <github repo> inside a VSCode terminal.
The action was interrupted by a VSCode popup window
"Image: The extension GitHub wants to sign in using GitHub."
I [Cancel]'ed that popup, but npm still hung.
This time two popups occurred in vscode asking me for username and password.Image: VSCode input dialogues for username and password
I [ESC][ESC]'ed out of those, but the same thing happened a second time.
I avoided that too by doing [Cancel][ESC][ESC] again.
Despite my actions to "ignore" the interruption, the GitHub library actually got installed (Hurray).
Retrying the same install in a terminal outside VSCode, did not show the same interruption.
Does anybody know how I can get rid of this annoying interference from VSCode?
It should be noted that there are no GitHub extension showing in the VSCode extension list.
Is there some internal GitHub extention in VSCode?
I already have perfectly good SSH-key credentials for GitHub that works well with npm outside VSCode. I do not see why I should spread my credentials to VSCode as well.
Regards,
Erik
VSCode 1.48.2,
Ubuntu 18.04.5 LTS
I had this problem too, and only found suggestion of setting
"github.gitAuthentication": false,
This stopped the first popup you describe, but I could still not suppress the second Git username and password dialog. I've found that to stop that, it is also necessary to set:
"git.terminalAuthentication": false,
Note: The integrated terminal will need to be exited/restarted for this to take effect.
I'm doing CS50 AI ( a course from harvard on EdX) and as a result been using submit50 (the command we use to submit assignments) in VSCode via the Windows Subsystem for Linux. Until I updated my IDE to the April update, submit50 used to ask my GitHub username and password in the the terminal itself similar to CS50 IDE.
After the April Update, it redirected me to the GitHub website for authentication and ever since then, I've been getting an error and can't figure out how to fix this.
I've tried re-install VSCode and submit50, upgrading submit50 and none of this has helped.
The Error I'm getting
I deleted VSCode and Code from Appdata to try and delete all data but that did not help.
Git Asking for permission
Any help would be appreciated!
This is due to the new automatic GitHub authentication introduced in VSCode version 1.45.
The temporary fix for this is to disable Git: GitHub Authentication in your VSCode settings either via the settings UI, or by adding the following line to your settings.json:
"git.githubAuthentication": false,
When you try to run submit50 again, a popup prompt for your username and password will appear instead!
Alternatively, you can disable Git: Terminal Authentication in your VSCode settings either via the settings UI, or by adding the following line to your settings.json:
"git.terminalAuthentication": false,
Via this method, you'll get the login prompt for submit50 inside the terminal as per usual.