Vscodium: VSCodium 1.45.0 cannot authenticate with Github

Created on 14 May 2020  ·  26Comments  ·  Source: VSCodium/vscodium

Describe the bug
VSCodium 1.45.0 cannot authenticate with Github.

Please confirm that this problem is VSCodium-specific

  • [x] This bug doesn't happen if I use Microsoft's Visual Studio Code. It only happens in VSCodium.

Please confirm that the issue/resolution isn't already documented

  • [x] I checked the Docs page and my issue is not mentioned there.

To Reproduce
Steps to reproduce the behavior:

  1. Clone a Github repository and work on it, committing changes, work on branches locally, etc.
  2. Push to remote or publish a branch, etc.
  3. Click "Allow" on the dialog that says "The extension 'Git' wants to sign in using Github."
  4. Click "Open" on the dialog that says "Do you want VSCodium to open the external website?"
  5. A page launches in my web browser (Firefox 76.0.1) with the header "Authorize Visual Studio Code to access GitHub", click "Continue." (I wonder if this shows the problem because VSCodium is identifying itself to Github as Visual Studio Code???)
  6. It fails with a page that says "Oh no! An error occurred! Please restart the sign in process from the editor. Forbidden".

Expected behavior
Github web authentication to succeed without error.

Screenshots
Here is the Github error page:

Desktop (please complete the following information):

  • OS: RHEL 8.2 (Gnome 3.32.2 in Xorg mode with Linux kernel 4.18.0)
  • Architecture: x86_64
  • Version: 1.45.0

Additional context
This does not happen with Microsoft's build of Visual Studio Code.

bug

Most helpful comment

I "forced" the authentication via Github PR extension

Tested on 2 computers.

Manjaro

Version: 1.45.0
Commit: d69a79b73808559a91206d73d7717ff5f798f23c
OS: Linux x64 5.6.11-1-MANJARO

KDE Neon

Version: 1.45.1
OS: Linux x64 4.15.0-101-generic
Distro: KDE Neon 5.18.5

Extension info

Name: GitHub Pull Requests and Issues
Id: github.vscode-pull-request-github
Version: 0.16.0

  1. After installing the extension, close codium and execute it via command line passing this parameter. (Explanation)
codium --enable-proposed-api Github.vscode-pull-request-github
  1. You should be prompted with this window. Click Sign In and then Allow

image

image


  1. Copy the link.

image

  1. Paste it on your browser and change vscodium => vscode
+ ?callbackUri=vscode://vscode.github-authentication/did-authenticate...
- ?callbackUri=vscodium://vscode.github-authentication/did-authenticate...
  1. Click Continue on the page asking to _Authorize Visual Studio Code to access Github_.

  2. You should be redirected to another page where you actually give permission to VSCode for Github. Click on Authorize.

  3. The first time I gave the permission, I got the 801 Error.

  4. I repeated the process from steps 1 to 5 and after clicking continue on step 5 I got a success message.

image

  1. Now you have to replace vscode => vscodium at the start of the token.
+ vscodium://vscode.github-authentication/did-authenticate...
- vscode://vscode.github-authentication/did-authenticate...

:warning: Take a look at the copied token because you may have to trim whitespaces on each end.

  1. Back to VSCodium, click on the Signing in to github.com and enter your token. I believe that it also asks for username and password.
    image

:tada:

image

All 26 comments

Related => https://github.com/microsoft/vscode-pull-request-github/issues/1778#issue-614883422

Also from the wiki of the Github PR Extension, although this issue is related with Github Auth.

Thank you @marcorichetta! I've subscribed to the issue #1778 you linked to, looks like it is an ongoing issue.

How can we help fix it?

Hi @penyuan.

I tried the solutions on the linked issue but none of them worked for me. Maybe it's related to Github's backend but I don't know really.

VSCodium

Version: 1.45.0
Commit: d69a79b73808559a91206d73d7717ff5f798f23c
OS: Linux x64 5.6.11-1-MANJARO

Extension info

Name: GitHub Pull Requests and Issues
Id: github.vscode-pull-request-github
Version: 0.16.0

That's too bad. Hopefully someone can chime in with a possible solution.

Hi, it's happening to me too, i updated today to 1.45.1, tried to push from Source control and have the same problem. If you choose to sign in using github clicking in Allow this takes you to your browser, where the problem is (I assume that's some github certificate with Visual Studio Code).
If you press Cancel instead of Allow, vscodium prompts you to enter your user and password and everything is ok.

A good workaround would be to set github source control plugin form vscodium to not request you to sign in using your browser and instead directly show the user/password prompts right there in vscodium.

If you know how to do it let me know hahaha
I'll be looking for it along the week

Yeah I'm able to reproduce this on my machine as well. Next step would be to see if a self-built "Code - OSS" has this same issue. Would be good to dig through the microsoft/vscode-pull-request-github code to figure out what it's expecting. I suspect the issue is on the https://vscode-auth.github.com side though, and I'm not sure where that code is (or if its open source at all).

Hi.

I was able to authenticate with the steps from the linked issue on the GH PR extension.

Tomorrow I'll try to share a gif with the steps.

Hi.

I was able to authenticate with the steps from the linked issue on the GH PR extension.

Tomorrow I'll try to share a gif with the steps.

Awesome, thank you! Can't wait to see the GIF. :smiley:

I "forced" the authentication via Github PR extension

Tested on 2 computers.

Manjaro

Version: 1.45.0
Commit: d69a79b73808559a91206d73d7717ff5f798f23c
OS: Linux x64 5.6.11-1-MANJARO

KDE Neon

Version: 1.45.1
OS: Linux x64 4.15.0-101-generic
Distro: KDE Neon 5.18.5

Extension info

Name: GitHub Pull Requests and Issues
Id: github.vscode-pull-request-github
Version: 0.16.0

  1. After installing the extension, close codium and execute it via command line passing this parameter. (Explanation)
codium --enable-proposed-api Github.vscode-pull-request-github
  1. You should be prompted with this window. Click Sign In and then Allow

image

image


  1. Copy the link.

image

  1. Paste it on your browser and change vscodium => vscode
+ ?callbackUri=vscode://vscode.github-authentication/did-authenticate...
- ?callbackUri=vscodium://vscode.github-authentication/did-authenticate...
  1. Click Continue on the page asking to _Authorize Visual Studio Code to access Github_.

  2. You should be redirected to another page where you actually give permission to VSCode for Github. Click on Authorize.

  3. The first time I gave the permission, I got the 801 Error.

  4. I repeated the process from steps 1 to 5 and after clicking continue on step 5 I got a success message.

image

  1. Now you have to replace vscode => vscodium at the start of the token.
+ vscodium://vscode.github-authentication/did-authenticate...
- vscode://vscode.github-authentication/did-authenticate...

:warning: Take a look at the copied token because you may have to trim whitespaces on each end.

  1. Back to VSCodium, click on the Signing in to github.com and enter your token. I believe that it also asks for username and password.
    image

:tada:

image

This solution seems to work for me as a viable workaround, and I didn't even need to use the GitHub PR extension since I triggered it with the built-in git push function, thank you @marcorichetta!

Now, how can we get a more comprehensive fix?

What solved it for me (Codium on Windows 10) was to install the latest version of my git client from https://git-scm.com/
Now it works with git 2.27.0

What solved it for me (Codium on Windows 10) was to install the latest version of my git client from https://git-scm.com/
Now it works with git 2.27.0

I tried this in Mac (ver. 2.27.0), didn't work for me.

Is anyone still experiencing this in 1.47.x ?

@stripedpajamas Not on my pc right now but tomorrow I'll try and I'll comment here.

@stripedpajamas I got this error with
VSCodium Version: 1.47.3
GitHub Pull Requests and Issues Version : v0.18.1
MacOS v10.14.6 (18G2022)

Screenshot 2020-07-29 at 1 38 45 PM

the URL being redirected is
https://vscode-auth.github.com/authorize/?callbackUri=vscodium://vscode.github-authentication/did-authenticate%253FwindowId%253D1&scope=read:user%20repo%20user:email&state=xxxx&responseType=code&authServer=https://github.com

@stripedpajamas I still get the same error as @vazra.

Information

Linux x64 4.15.0-112-generic
KDE Neon 5.18.5
VSCodium Version: 1.47.3

Extension
Version: 0.18.0
Name: GitHub Pull Requests and Issues

I have almost the same setup as @vazra except I'm on ArchLinux. Can't get past that message. Refreshing the page or trying again doesn't help.

Version: 1.47.3
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.7.11-arch1-1
- - - - - -   
Name: GitHub Pull Requests and Issues
Id: github.vscode-pull-request-github
Description: Pull Request and Issue Provider for GitHub
Version: 0.18.0
Publisher: GitHub
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github

I have found a workaround though, but I wouldn't advise using it for security reasons.
You can create a new access token in "Developer Settings" of your GitHub Profile. Since I don't know what permissions does Github PR need, I tried granting almost everything, and it worked. Granting only the access to repos and gists (what JetBrains IDEs require) doesn't work. Then just ignore the authorization page and paste your custom access token into the field in VSCode.

macOS, 10.15.6 (19G2021)
VSCodium, 1.48.1

If you press Cancel instead of Allow, vscodium prompts you to enter your user and password and everything is ok. @h3adHunter

Worked for me 🤷‍♂️

Will follow up after I've done a fresh macOS install to see if this is a quirk of my OS or a VSCodium bug, the latter being likely if so many others are experiencing the issue too

Stating the obvious but, this issue will be a quick turn off for new (VSCodium) users so hope it's top priority to fix

Hope this helps

Sincerely

Didn't worked for me,
After passing token at step 10, I got this error:
new

OS: Debian GNU/Linux 10 (buster) x86_64
Kernel: 4.9.212-antix.1-amd64-smp
VSCodium Version: 1.48.2
GitHub Pull Requests and Issues Version : v0.19.0
GitHub Authentication Version : v0.0.1

marcorichetta's workaround worked for me. Two notes:

  • I had to be logged out of github when I opened the authentication link. (I used container tabs)
  • the whitespace is there in the copied token. it seems like a throwaway remark but do double check it :)

If anyone is still facing issues with this, a solution which worked for me was just connecting my git via ssh. I found this article online if it might be of help to anyone

https://www.freecodecamp.org/news/git-ssh-how-to/

Faced this issue on macOS with vscodium v1.51

https://github.com/VSCodium/vscodium/issues/401#issuecomment-631502370 worked for me though I needed to be signed out of GitHub. The simplest way is to do it in a private browser window.

Faced this issue on Linux with vscodium v1.50.1

#401 (comment) worked for me though I needed to be signed out of GitHub.

Same for me. Thanks for the workaround.

Is anyone still experiencing this in 1.47.x ?

My VSCodium version is 1.51.1. I did experience this and @marcorichetta answer worked fine for me.

The solution of @marcorichetta is working.
But the GitHub authentication extension can accept a personal access token but only in a test environment.
I thinks it would be better to make a patch to make it work everywhere and just ask for a personal access token. There won't be any confusion.
What do you think?

Switching:
https://vscode-auth.github.com/authorize/?callbackUri=vscodium://vscode.github-authentication...

to

https://vscode-auth.github.com/authorize/?callbackUri=vscode://vscode.github-authentication...

worked for me.

Was this page helpful?
0 / 5 - 0 ratings