question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After Update of VScode all github authenticaiton fails

See original GitHub issue
  • 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!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:16

github_iconTop GitHub Comments

4reactions
joshuajinirancommented, Nov 15, 2021

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

2reactions
sebastianbuechlercommented, Nov 16, 2021

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
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error message 'Authentication failed on the git remote'
try to commit from command line and see if it works or not. If it does, then your VSCode settings might have issues....
Read more >
How to resolve github authentication failure 'Could not ...
How to resolve github authentication failure 'Could not authenticate to Git remote' in VSCode · Abstract · Check and delete the old credentials...
Read more >
GitHub Authentication Failure in VS 2022
I found another workaround. Create a new VS 2022 project, add the files to source control, and then push it to GitHub. This...
Read more >
fatal: Authentication failed | Git | VS Code - YouTube
Solution 1: I first unchecked the git - auth from VsCode settings- git : Terminal Auth and settings- github : Git AuthAfter unchecking,...
Read more >
Use Git Credential Manager to authenticate to Azure Repos
Download and run the latest Git for Windows installer, which includes Git Credential Manager. Make sure to enable the Git Credential Manager ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found