vscode-pull-request-github icon indicating copy to clipboard operation
vscode-pull-request-github copied to clipboard

After Update of VScode all github authenticaiton fails

Open tgelite opened this issue 5 years ago • 17 comments

  • Extension version: 0.32.0
  • VSCode Version: 1.62.2
  • OS: NAME="Ubuntu" VERSION="20.04.3 LTS (Focal Fossa)"

Steps to Reproduce:

  1. Previouisly, I had successfully authenticated via VScode opening browser to be able to authenticate to our github private repo (non enterprise) I've been using it for a couple of months with no issue across multiple repo's we have.

2.I was prompted that there was a vscode update so I went ahead and updated. Upon restarting vscode and continuing work over the same folder (file >> open folder) and updating some code I followed the same steps I always did to save all, then go to "source control" and then "stage" and then add comment and submit, I get an authentication error.

  1. I then iterated over attempting to authenticate many times with errors that I failed to record to share here (sorry). Finally I "LOGGED OUT" of my github account, removed the local repo (rm -rf /path/to/local-clone).

  2. Returning to vscode I attempted to clone the repo through the UI and was prompted to authenticate, my browser window opened, I authenticated, and then things switched back to vscode. The dialog to select my repo location opens I pick the location I want it. But then I get the following errors.

> git clone https://github.com/mystuff-thats-private/private/private.git /home/thatguy/private --progress
remote: Repository not found.
fatal: Authentication failed for 'mystuff-thats-private/private/private.git/'

This is strange however because at this point I see myself authenticated (small person icon bottom right of screen) to github.

The browser window I had authenticated successfully indicates if things fail to paste a string into vscode but there is no context to do it and simply pasting into the command bar at the top fails on my later attempts during troubleshooting.

On later attempts the output repeats the same thing each time I attempt to "clone repository"

Validating found git in: git
Using git 2.25.1 from git
> git clone https://github.com/mystuff-thats-private/private/private.git  --progress
Cloning into '/home/thatdude/private'...
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/mystuff-thats-private/private/private.git'
> git clone https://github.com/mystuff-thats-private/private/private.git --progress
Cloning into '/home/thatdude/private'...
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/mystuff-thats-private/private/private.git'
> git clone https://github.com/mystuff-thats-private/private/private.git /home/thatdude/private --progress
Cloning into '/home/thatdude/private'...
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/mystuff-thats-private/private/private.git'

I have read the other outdated posts that google brought me to (2018) but none of the things indicated seem to match what I'm seeing with being able to log in successfully via browser but having no way to recover from failure and enter the vscode:blah string given to me by the success page in my browser. This is what the browser states:

Success!
Authorization was successful. You will be redirected back to Visual Studio Code

Didn't work?
If you aren't redirected, you can add the token manually.

Your authorization token:
(my token string that starts with vscode://vscode.github-authentication/did-authenticate?windowid=1&code=(none of your business)

1. Copy the token
2. Switch back to VS code.
3. Click Signing in to github.com... in the status bar.  <<<< THERE IS NO SUCH CONTEXT WHEN RETURNING TO VSCODE
4. Paste the token and hit enter.

At this point I'm stuck and I have looped over logging back out (small person icon bottom right of vscode sidebar), and getting lost trying to re-trigger the web authentication all over again (I stumble across it after googling around and trying over and over).

Why is there not a "log back into github" functionality tied to that same menu that lets me log out? Or any of the other menus or command items to trigger a context that lets me paste the token string I got from the success web page into? This is far too hard to sort out troubleshooting because I'm lost in a loop... help!

tgelite avatar Nov 15 '21 04:11 tgelite

This is happening across all my local repo instances actually, when opening folder for another previously working repo, and trying to sync, this is what the "Output" states (I did not delete this local repo so this is same state my first comment was in before I started trying to fix)

Validating found git in: git
Using git 2.25.1 from git
> git rev-parse --git-dir
Open repository: /home/thatguy/private-docker
> git status -z -u
> git symbolic-ref --short HEAD
> git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/main refs/remotes/main
> git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname)
> git remote --verbose
> git config --get commit.template
> git show --textconv :influxdb/Dockerfile
> git ls-files --stage -- /home/thatguy/private-docker/influxdb/Dockerfile
> git cat-file -s 5e782ec9f19975dbdd3d0f67ae4729da91bcf7e8
> git check-ignore -v -z --stdin
> git config --local branch.main.github-pr-owner-number
> git log --oneline --cherry main...main@{upstream} --
> git pull --tags origin main
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/mystuff-thats-private/private-docker/private-docker.git/'
> git ls-files --stage -- /home/thatguy/private-docker/influxdb/Dockerfile
> git cat-file -s 5e782ec9f19975dbdd3d0f67ae4729da91bcf7e8
> git show --textconv :influxdb/Dockerfile
> git status -z -u
> git symbolic-ref --short HEAD
> git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/main refs/remotes/main
> git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname)
> git remote --verbose
> git config --get commit.template
> git log --oneline --cherry main...main@{upstream} --
> git pull --tags origin main
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/mystuff-thats-private/private-docker/private-docker.git/'
> git status -z -u
> git symbolic-ref --short HEAD
> git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/main refs/remotes/main
> git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname)
> git remote --verbose
> git config --get commit.template

tgelite avatar Nov 15 '21 04:11 tgelite

I am currently experiencing this @tgelite, I upgraded to 1.62.2 yesterday and found out I wasn't able to authenticate, however I was able to authenticate on my system terminal.

I have downgraded to 1.61.2, and it authenticates fine.

This is a likely bug with the 1.62.2

joshuajiniran avatar Nov 15 '21 09:11 joshuajiniran

This is also occurring with Windows VSCode. Last updated broke Git authentication.

CHI-moneil avatar Nov 15 '21 17:11 CHI-moneil

Here as well. I'm running 1.62.2 and wenn I want to fetch (or push) something to my private repo the usual Github Login prompt opens but it won't authenticate properly: image image

Could it have something to do that Github had a change in their password authentication three months ago? https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/

sebastianbuechler avatar Nov 16 '21 07:11 sebastianbuechler

@sebastianbuechler I don't think it has anything to do with password authentication, AFAIK, I have switched to using the personal access token for authentication for over 3 months now which works fine and is still working as I have downgraded to 1.61.2. This should be an issue in the new upgrade release

joshuajiniran avatar Nov 16 '21 07:11 joshuajiniran

Here as well. I'm running 1.62.2 and wenn I want to fetch (or push) something to my private repo the usual Github Login prompt opens but it won't authenticate properly: image image

Could it have something to do that Github had a change in their password authentication three months ago? https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/

Turns out this change indeed affected me and I never changed it. After some reading of the docs I found this: https://docs.github.com/en/get-started/getting-started-with-git/caching-your-github-credentials-in-git

My crucial point was the git version: "At a minimum, install version 2.29" I had version 2.27.x and needed to upgrade. So maybe this could help:

  • git --version to check if at least 2.29
  • If not upgrade with git update-git-for-windows if you're running windows.
  • Re-authenticate with vs-code

sebastianbuechler avatar Nov 16 '21 07:11 sebastianbuechler

Hi, I'm experiencing this same problem and I have git version 2.30.

Regards

mithdrann avatar Nov 16 '21 11:11 mithdrann

+1 same here. Running on ubuntu.

Version: 1.62.2 Commit: 3a6960b964327f0e3882ce18fcebd07ed191b316 Date: 2021-11-11T20:51:30.084Z Electron: 13.5.2 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Linux x64 5.4.0-90-generic

kapsner avatar Nov 16 '21 16:11 kapsner

here as well. image

running. if I roll back to previous version problem goes away. I can confirm also same issue on same version on Mac. image

mars000 avatar Nov 17 '21 08:11 mars000

Well, my PC at work works for 1.62.2, but my PC at home has the git authentication failure for 1.62.2. The only difference I could find is that my home PC is installed "system setup" and the work PC is "user setup". I'm not sure what the difference is between the two...? Not sure if this may be the cause of this issue...?

oneilonline avatar Nov 17 '21 18:11 oneilonline

It seems that this problem was already fixed. I've just upgraded vscode to 1.62.3 and it worked! https://github.com/microsoft/vscode/issues/136837

BonyChops avatar Nov 20 '21 05:11 BonyChops

Confirmed issue is fixed after updating to 1.62.3

tgelite avatar Nov 21 '21 20:11 tgelite

yesteday i upgrade vscode to 1.62.3 and git push success, but now i facing the same issue..my git push authentication failed again :( github-error

yudhatp avatar Nov 25 '21 04:11 yudhatp

It seems that this problem was already fixed. I've just upgraded vscode to 1.62.3 and it worked! microsoft/vscode#136837

No, not about mine. I have upgraded to the 1.63.2 version but still, have same problem. I am using the KDE neon user edition which is an ubuntu-base Linux

kiumarsj avatar Jan 28 '22 13:01 kiumarsj

Hello, Don't work for me neither Kubuntu 20.04 LTS, vscode : snap and version 1.64.2

Walfal avatar Feb 14 '22 13:02 Walfal

Problem solved, I had installed vscode with snap, but when I installed it with a .deb, it works

Walfal avatar Feb 19 '22 16:02 Walfal

Same here. With the snap it is stuck in "signing in to github.com". With the .deb works just fine.

JoseFMP avatar Jun 15 '24 08:06 JoseFMP