-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Cannot sign in to Github account #1883
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
Comments
Definitely need to look into this, I took a swing a few weeks ago but wasn't able to figure it out at the time. |
I had the same issue and was able to figure out a solution. I took the url that a regular instance of VSCode spits out and used it to reverse engineer how the url is put together. A auth url from code-server looks like this: What I did was take the state parameter at the end of the auth url given by code-server and insert it into the url below which is derived from the url a normal version of VSCode spits out. A final url will look like this: After going to the page you will get an auth token that looks something like this: Then, back in code-server you can click signing into github.com in the task bar and paste the auth token. Hope this helps! |
@jinexists Thanks. It works. 😁 |
So I guess we're spitting out the URL incorrectly for some reason. |
Looking at that URL, maybe we need to add a handler for Related: #1571 |
OMG, I just couldn't find your post on my own googling. Luckily Quietsy from the linuxserver group helped point me your way. I will say that the structure changed a little bit for me so I'll paste my case for future reference. Thank you again for troubleshooting this.
|
thanks for the workaround, worked for me! this was driving me nuts! |
I get this error:
Is there absolutely no way add GitHub sign-in other than this? |
I can confirm this bug (it's probably already confirmed enough though) |
It gave me |
Hi i appreciate the help this solution worked perfect for me. |
I just tried this and it works, thanks. However, it seems like private repositories don't load up in the search results and therefore I cannot clone a private repository. |
I am also blocked by this error. The workaround failed, and gave me the error “Sign in Failed: Received mismatched state”. |
If anyone wants to modify GitHub workflow files, I modified the URL a bit:
|
I can confirm the structure mentionde by @gmrukwa works fine 👍🏻 @bt You need to type in the actual repo name, as by default, only public repos will initially show up in the search result. Otherwise, if it still doesn't work, try adding "scope=repo**,wokflow**" instead of just I've tried it and works fine cloning private repos. Regards! |
After updating code-server and attempting to auth with github I get a 404 on my code-server instance:
|
Still experiencing this |
Same problem here. Rewriting the link like @gmrukwa suggested and pasting the result worked (you don't have that much time to enter it in vscode; an error will occur otherwise). |
Unfortunately the workaround doesn't work for me. Pasting the vscode:// part after clicking on "Signing in to GitHub.com..." doesn't do anything, no error message. A few seconds later the "Signing in to GitHub.com"-party disappears but I'm not logged in. |
@vordenken that may depend on the versions you are using. I've created myself another instruction for newer version recently:
It's a bit different than the workaround above, there are slightly different URIs. The above stopped working for me too some time ago already, so now I've set up git credentials helper to store my credentials, and when |
Sorry for comment to a closed issue. I confirm this solution still works. However, I need to copy paste quickly. Otherwise, the state expires in seconds. |
Any reason why this has been closed? I am still experiencing this issue. (or is this a technical limitation?) The workaround above still works, but this is very tedious, especially since it seems that the authentication is not stored on the server but the client (which means I need to use the workaround on an iPad which is a pain...) |
It was closed when we fixed it. There's also another issue we're tracking this in here: #4795 Please subscribe to that! It should fix this tedious process and make it work as expected :) (less of a pain on an iPad too!) |
Cannot sign in to Github.

When I click on "Clone repository" under SCM tab and provide the repo url and folder, it asks me to sign in to Github.
The authorization page opens in a new tab:
After clicking on "Continue", the following error occurs:

I tried to generate "Personal Access Token" on Github, then entered that here:

This did not work either.
code-server --version
: 3.4.1The text was updated successfully, but these errors were encountered: