-
Notifications
You must be signed in to change notification settings - Fork 6.3k
-
Hello
I'm using code-server
as here pull#3544 shows that Copilot isn't support at this moment
Is there any possible to make it usable?
Beta Was this translation helpful? Give feedback.
All reactions
Hi guys, I'm curious if you're still experiencing the issue because I solved it.
If you still have the issue, please refer to the following article.
Since I'm Korean, it's posted in Korean, so I'll attach the translated page as well.
Original Page
Translated Page (Eng)
Replies: 15 comments 71 replies
-
You can try SSHing into VSCode with this guide and then try to use Copilot.
Let me know if that works!
Beta Was this translation helpful? Give feedback.
All reactions
-
I'm having an issue using code-server with Copilot, in the output tab there is an error log:
[INFO] [auth] [2021年10月25日T05:47:58.412Z] Invalid copilot token: missing token
Beta Was this translation helpful? Give feedback.
All reactions
-
You will need to sign up for the beta of OpenAI.
Beta Was this translation helpful? Give feedback.
All reactions
-
I've signed up before, and I'm able to use Copilot on my vscode of macOS
Beta Was this translation helpful? Give feedback.
All reactions
-
Did this work?
Beta Was this translation helpful? Give feedback.
All reactions
-
No, Copilot prompted me to login to Github and I did it, but it still complained missing token. While I'm able to use Copilot on macOS just fine.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 4
-
You will need to sign up for the beta of OpenAI.
You shouldn't need that for Copilot
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Guys, I have a slight doubt. Yesterday, I found a mail from GitHub, that they opted me into the Copilot Technical Preview. How can I get this on code-server? Should I get the VSIX file from the Visual Studio Marketplace, upload it onto my instance and install it via the CLI?
That kinda seems right on Gitpod, since I needed to do the same to install the Aura theme. So, does it apply the same to code-server?
Beta Was this translation helpful? Give feedback.
All reactions
-
I download the vsix first and use CLI to install it, see https://github.com/soulmachine/docker-images/blob/master/code-server/Dockerfile.base#L92
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Same pinch dude but can I log in to Copilot?
Beta Was this translation helpful? Give feedback.
All reactions
-
I might try to see why this isn't working by editing/inspecting the code of Copilot and see if I can get it going
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
We do have it but as a result of a bug if you do not include the flag the proposed API will be enabled for all extensions by default.
Beta Was this translation helpful? Give feedback.
All reactions
-
👀 1
-
@Heath123 try:
sed -i 's/"GitHub.remotehub",/"GitHub.remotehub",\n "GitHub.copilot",/g' /usr/lib/code-server/vendor/modules/code-oss-dev/product.jsonAnd then use the token you extracted from regular VSCode by debugging the extension.
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 2
-
@ZauberNerd How can I use the token from vscode in code-server?
Beta Was this translation helpful? Give feedback.
All reactions
-
@ankarhem sorry, I can't give you detailed instructions. You'll have to debug that yourself. You could try the same as @Heath123 by editing the extension or you could probably use a MITM proxy or maybe try to extract it from some storage location or whatever.
Beta Was this translation helpful? Give feedback.
All reactions
-
Yep, if you deminify the code you can find where it gets the token, I can help with that if you want. Sorry, I haven't really managed to try it properly yet
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi guys, I'm curious if you're still experiencing the issue because I solved it.
If you still have the issue, please refer to the following article.
Since I'm Korean, it's posted in Korean, so I'll attach the translated page as well.
Original Page
Translated Page (Eng)
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1 -
🎉 7
-
I followed the steps, but it does not work. I enter the auth url and nothing happens.
Beta Was this translation helpful? Give feedback.
All reactions
-
It worked for me, thanks for sharing!
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
I followed the steps, but it does not work. I enter the auth url and nothing happens.
That's probably because you didn't agree to the Copilot terms and conditions.
Pop-up sometimes doesn't come up. If you refresh it, it might come up. In my case, that works.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
The extension itself won't show up at the search.
Have any of you guys been through this?
Beta Was this translation helpful? Give feedback.
All reactions
-
The extension itself won't show up at the search. Have any of you guys been through this?
Because the copilot isn't available on third party extension market.
Beta Was this translation helpful? Give feedback.
All reactions
-
https://vscode-auth.github.com/authorize/?callbackUri=vscode://vscode.github-authentication/did-authenticate&scope=repo&state={token}&responseType=code
Beta Was this translation helpful? Give feedback.
All reactions
-
@Prajwal-Koirala url worked for me;
- download latest copilot vsix
- in code server
> Install from VSIXand install copilot - when code server asks you to log in; follow that to your browser and pull out the
stateuuid token from the url - use @Prajwal-Koirala url and put your state token in there
https://vscode-auth.github.com/authorize/?callbackUri=vscode://vscode.github-authentication/did-authenticate&scope=repo&state={token}&responseType=codeand paste that into your browser - follow through to authenticate and you will eventually get to the page where it will display your URI eg.
vscode:..... copy that - in code server you'll see something like "Signing into github..." status message on the bottom leftish which you can click and you paste in the URI you just got
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 4
-
We'd probably need to make sure we're not breaking any legal agreements. Something tells me that Copilot can only be used in Microsoft products. However, if that's not true, we could add it to the docs.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
they do have jetbrains/neovim plugins at the moment. All of their current plugins are "licensed" with;
This technical preview is a Beta Preview under the GitHub Terms of Service.
I would assume once live this would completely change as well.
Beta Was this translation helpful? Give feedback.
All reactions
-
So, are you meaning we make a plugin for Copilot? I don't think that'd change anything, since we need to install Copilot, Copilot doesn't need to do anything. But that might seem like violating Microsoft's ToS, hence we are thinking.
Beta Was this translation helpful? Give feedback.
All reactions
-
Ahh sorry no I don't mean we make a plugin. I'm just linking what they've already made themselves and the ToS they've got. I'm not familar with Microsoft/Github's ToS and how this project and plugins relate to it.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
We'd probably need to make sure we're not breaking any legal agreements. Something tells me that Copilot can only be used in Microsoft products. However, if that's not true, we could add it to the docs.
Well, it's probably against the Marketplace ToS at least
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
I am sorry for reopening the discussion, but the solution no longer works.
before, we can extract the state, and put it into the @Prajwal-Koirala url. Now, it doesn't work. The auth url also changed into something like "https://github.com/login?client_id=ad768f28053cf9566b63&return_to=%2Flogin%2Foauth%2Fauthorize%3Fclient_id%3Dad768f28053cf9566b63%26response_type%3Dcode%26scope%3Dread%253Auser%26state%3D%257B%2522callback%2522%253A%2522https%253A%252F%252Fsomeurl.com%252Fcallback%253Fvscode-requestId%253D80f6c042-7bd2-4aa0-8702-55351a3b14c0%255Cu0026vscode-scheme%253Dcode-oss%255Cu0026vscode-authority%253Dvscode.github-authentication%255Cu0026vscode-path%253D%25252Fdid-authenticate%2522%252C%2522state%2522%253A%252283862aae-c0b7-4e92-9631-fcc8b80d8af0%2522%257D"
I tried to decode the url to get the state, but the code-server refuse to auth and throwing bad request.
When doing auth normaly, while it works on some extension like gitlens, it doesn't on github copilot. It says token not found [404] and it asked me to joint he waitlist.
Beta Was this translation helpful? Give feedback.
All reactions
-
Anything in the logs?
Beta Was this translation helpful? Give feedback.
All reactions
-
if you mean the output
[INFO] [auth] [2022年03月13日T01:52:07.665Z] Invalid copilot token: missing token: 404
[ERROR] [default] [2022年03月13日T01:52:07.668Z] GitHub Copilot could not connect to server. Extension activation failed: "User not authorized"
I am authorized, I can use it fine on desktop vs code, and could use it before using the web using @Prajwal-Koirala url. I also tried using personal token method (by using localhost) instead of url, it's the same problem.
Beta Was this translation helpful? Give feedback.
All reactions
-
If I tried to extract the state from the url and put it @Prajwal-Koirala URL, the output shows :
[ERROR] [default] [2022年03月13日T01:58:42.075Z] GitHub Copilot could not connect to server. Extension activation failed: "Bad Request"
Beta Was this translation helpful? Give feedback.
All reactions
-
😕 1
-
I really don't know :(
I will try repros on a Raspberry Pi after exams tho...
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
Does this URL work? While having your instance open ofc
https://vscode-auth.github.com/authorize/?callbackUri=vscode://vscode.github-authentication/did-authenticate&scope=repo&state=af75d661-fd20-46a9-843b-b081aaa26d84&responseType=code
Tried this before, this is what i refer to
I tried to decode the url to get the state, but the code-server refuse to auth and throwing bad request.
Wait, maybe all you have to do is add the authorize part on your URL! Try this, if it works, then solved!
How do you get the requestID ?, by the time I have the requestID, auth is already successful
Beta Was this translation helpful? Give feedback.
All reactions
-
Hmm... Maybe if you slow your webpage loading time? I don't know, need to find more insight on this.
Beta Was this translation helpful? Give feedback.
All reactions
-
The newest code-server 4.2.0 using a new method of auth and works fine now. The auth breaks on 4.1.0.. Version 4.0.2 and 4.2.0 works fine.
Beta Was this translation helpful? Give feedback.
All reactions
-
🎉 2
-
Okay, great! Guess I'll just update my Pi and enjoy!
Beta Was this translation helpful? Give feedback.
All reactions
-
Welp i tried it but i get this error from GitHub Copilot: ERROR] [default] [2023年04月25日T16:45:19.666Z] GitHub Copilot could not connect to server. Extension activation failed: "Cancelled"
Beta Was this translation helpful? Give feedback.
All reactions
-
My advice: Keep your hands off GitHub Copilot.
Beta Was this translation helpful? Give feedback.
All reactions
-
👎 11
-
Should a human programmer take the same approach, studying free software and applying those lessons, but not the code itself, to original projects, I would agree that their applied knowledge is not creating derivative works. However, that is not how machine learning works. Machine learning is essentially a glorified pattern recognition and reproduction engine, and does not represent a genuine generalization of the learning process. It is perhaps capable of a limited amount of originality, but is also capable of degrading to the simple case of copy and paste.
I disagree with the statement that machine learning isn't really learning, I feel like people clinging onto that idea just want to think that humans are special and computers will never surpass them. Really, aren't humans just glorified pattern recognition and reproduction engines? I do think it would be better if they only used permissively licensed code just to be safe, but personally I'm not going to stop using it based on the license concerns
Beta Was this translation helpful? Give feedback.
All reactions
-
I used all the methods above, but I can't log in to GitHub from the copilot
I installed copilot from VSIX
I'm using the latest version of code-server
code-server: v4.8.3
Code: 1.72.1
Does anyone know how to log in to GitHub to use copilot?
Beta Was this translation helpful? Give feedback.
All reactions
-
Code-Server v4.9.1
Copilot version 1.65.7705 visx from marketplace
Uploaded visx to code server files pane via drag and drop. Right click install visx extension. Click on popular from copilot to log in / authorise github, follow prompts for 2fa, all signed in successfully without any issues. No copying or pasting of tokens or URLs or anything.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 3 -
🚀 1
-
I can confirm this method works.
Copilot does not appear in the marketplace but does install and the authentication process works as well.
Beta Was this translation helpful? Give feedback.
All reactions
-
This should be the accepted answer! Easy, and the old way doesn't seem to work anymore.
Beta Was this translation helpful? Give feedback.
All reactions
-
To anyone who still can't login copilot with github accounts,
You need to remove any extension which related with github,
Its better to delete the extensions folder and restart code server then install what extension you need again,
It will fix the issue
I had this issue and i could fix it with deleting all extensions
Looks like an old extension handles the github login thats why github keep saying update your vscode
after removing all my extensions its working fine
Beta Was this translation helpful? Give feedback.
All reactions
-
August 2023 update - no more tricks needed
Step-by-step process here: #5063 (comment)
(tl;dr: download the extension vsix file from here: https://marketplace.visualstudio.com/items?itemName=GitHub.copilot then drag and drop it into code-server filetree, then right click on it and install, then you'll get a notification to sign into github, follow the prompts and you're done)
Beta Was this translation helpful? Give feedback.
All reactions
-
I'm still on version v0.9.2023101002, that worked just fine
Beta Was this translation helpful? Give feedback.
All reactions
-
Could you share your v0.9.2023101002 vsix?
Both https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat and Google Search result do not show Copilot Chat v0.9.2023101002 vsix.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions
-
it works for me with latest code-server + copilot extensions as well
Beta Was this translation helpful? Give feedback.
All reactions
-
v0.9.2023101002 was a buggy on my side and the fact that I don't have tha latest version makes me realy sad.
I did some research and I finnaly build my own code-server image with an official installation on ubuntu.
Here is my repo if you want : https://github.com/nerasse/my-code-server
gl guys
Beta Was this translation helpful? Give feedback.
All reactions
-
code-server --install-extension GitHub.copilot
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi everyone,
I tried the above approach, when I try to sign in into the GitHub copilot. I get this pop up of You have not yet finished authorizing this extension to use GitHub. Would you like to try a different way? (personal access token) Source: GitHub Authentication when i click on yes. it asks to create a personal acess token when I get give the personal token, I am getting this below error in the output window.
auth: Error: No auth flow succeeded.
at a.GitHubServer login (/code-server-4.93.1-linux-amd64/lib/vscode/extensions/github-authentication/dist/extension js 1:228535)
at process TicksAndRejections (node internal/process/task_queues:95:5)
at a.GitHubAuthenticationProvider.createSession (/code-server-4.93.1-linux-amd64/lib/vscode/extensions/github- authentication/dist/extension.js:1:224358)
at c. $createSession (/code-server-4.93.1-linux-amd64/lib/vscode/out/vs/workbench/api/node/out-vscode-reh-
web/vs/workberich/api/node/file:/home/runner/work/code-server/code- server/lib/vscode/src/vs/workbench/api/common/extHostAuthentication.ts:89:11)
I am using the latest github copilot and vs-codeserver (v4.93.1) vs code (1.93.1)
is there any workaround for this issue?
Beta Was this translation helpful? Give feedback.