New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copilot failing to connect in VS Codium #1388
Comments
There is a tutorial here on how to get GitHub Copilot to work in VSCodium. Let me know if you get it working as I'm also interested in using Copilot in VSCodium! |
Worked for me! Thank you so much for this Link, just sad that it does not show up on the first google entry when you type "vscode github-copilot" |
I can confirm it works, you have to install vscode first tho, and I personally didn't find the same snippet, I console.logged |
I agree with @StitiFatah, It works with his tweak. The search I used is |
This approach is no longer valid as the VSCODE in latest version use github authentication instead |
Current error I'm getting is 'token not found'. Looking at the files mentioned in the articles above, the lines mentioned in the article have changed from:
to:
I know very little about js, but it seems like this is related to a change in how tokens are stored in the keychain. I looked at keychain access on my mac, and the
whereas Has anybody tried to use an older version of the extension to see if the authentication issue related to the extension version or the codium version? |
I managed to get the token (and connect Copilot) adding the try{console.log(t); return await e.get(a.Fetcher).fetch(n,{headers:{Authorization:`token ${t.token}`,...(0,i.editorVersionHeaders)(e)}})}catch(t){throw e.get(o.UserErrorNotifier).notifyUser(e,t),t}}(e,t); You also could add it as a new statement just like @EricBoily mentions before
For example: catch(t){throw e.get(o.UserErrorNotifier).notifyUser(e,t),t}}(e,t); console.log(t); // [...] |
Is there any chance that vscodium will get out of the box support for copilot? It seems like the hacks mentioned might only work temporarily. |
@stdedos You should be able to see this: |
Yes, that's visible too. "But how could I know, I've never needed that". (Usually all actions are in the Command Palette 😅) |
Finally got it working first by deleting my key (thanks @jmainhard!), then using the token generated by the MS-tainted VSCode installation (see #1388 (comment), props to @jmainhard again). With the ChatGPT extension and GH Copilot in place, I just need to quit my habit of opening a browser and searching for help with my coding. 😅 |
For those trying to find the
|
I got disconnected and it wasn't even after a system update, it becomes annoying to download VScode for this, basically is it a thing vscodium would need to explicitly support for it to work normally or is this just Microsoft going back to the good ol' days ? I'm considering switching back to Neovim tbh.
Is the chatgpt extension (if yes which one ?) doing anything more than providing the same GUI as the official one but in the editor ? Otherwise there are plenty of CLI clients to avoid having to use a browser. I'm currently using https://github.com/sigoden/aichat |
A CLI solution is interesting for off-VSC activity, but since most of my coding happens in there, I use the ChatGPT - Genie AI extension, which is nicely integrated into the editor. |
Does it interact directly with your code (maybe by selecting it then opening a pop up window with the code already in the prompt) ? If yes might be interesting, otherwise Vsc has an integrated terminal too |
I think it's technically possible for VSCodium to support Copilot without all this hacking. Copilot worked out-of-the-box on my Arch laptop running Code - OSS, so perhaps all VSCodium would need to do is to change something on their build script. Given how relevant Copilot has become, perhaps the VSCodium distributors should make their support plans explicit on the VSCodium main page: if there are no plans to change the build scripts to support Copilot (perhaps it would involve allowing some nasty MS telemetry in), potential users should be advised to build VSC from source themselves. |
Exactly. Given the popularity of Copilot, the vscodium maintainers should really address this asap. |
Thanks for letting me know, I'm on Arch too and just installed code, it's working fine but I had to to run it via Unfortunately code isn't the same as vscodium privacy wise.
Yes probably, they inform about the marketplace issue and the workaround so why not |
Feel free to make a PR to fix any issue 😉 |
About AUR Code uses the protocol All is about how to the authentication, by default, VSCode calls a web service on github which reply with an url with |
But PAT tokens seem to always fail for me, it still says user not authenticated even when I am correctly signed in and have access to copilot! |
Just retried yesterday and it worked fine, it wasn't working at first although I got the token but then I updated copilot on both Vscode and Vscodium and it fixed it, maybe make sure you have the same version in both. |
I was able to get my token, thank you for that. But where do I re-enter it? I can't find anywhere in extension settings, I've uninstalled/reinstalled the extension, etc. |
(On vscodium) When you have copilot and you aren't logged in you have a pop-up in the bottom right corner asking you to connect, you click on "connect", it'll then redirect you to your browser, you ignore that since you already have your token, you'll then have an input box in the top asking you for your token and just past it here. |
Ok, I'm getting a different message in the Output tab. It's no longer saying that I don't have access, it's saying: Do I still have to activate it somewhere else? |
You got that after you pasted the token in the input form of vscodium ? |
Yes. |
Be sure your vscodium and Vscode version of copilot are both up to date, I had an error 2 days ago because of that |
This is my first time trying Copilot, so I wasn't sure what to expect. I'm using version 1.83.41 downloaded fresh from https://marketplace.visualstudio.com/items?itemName=GitHub.copilot I followed the instructions in #1487
Edit: I'm using Codium Insiders - 1.78.0-insider Edit again: I think it's working even though it was displaying that message. Thanks for the help. |
I haven't used the #1487 method to get the token, I got it from MS Vscode, don't know if there's any difference. And I'm not using vscodium-insiders but the regular version from the AUR. My products.json is also modified to get the official marketplace. If it can help. |
I followed the method at #1487 as well and it worked perfectly for connecting VS Codium without the need to do anything in VS Code. I did this on Windows myself and initially had an issue in both Command Prompt & Powershell with curl errors. Ended up resolving that problem by simply using the MING64 based Git Bash as part of the Git Windows package found at: |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment, and we'll keep it open. If you have any new additional information, please include it with your comment! |
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue, please open a new issue. |
Hi. I just got Copilot and trying to use it in VS Codium. It is not available in the store so I downloaded and installed .VSIX file. Other extensions installed in this way are working perfectly fine, excep Copilot.
The error I have:
Invalid copilot token: missing token: 404
GitHub Copilot could not connect to server. Extension activation failed: "User not authorized"
And a pop-up
The text was updated successfully, but these errors were encountered: