Skip to content
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

Issue using ssh keys to login to github #169567

Closed
TylerLeonhardt opened this issue Dec 19, 2022 · 7 comments
Closed

Issue using ssh keys to login to github #169567

TylerLeonhardt opened this issue Dec 19, 2022 · 7 comments
Assignees
Labels
info-needed Issue requires more information from poster *question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@TylerLeonhardt
Copy link
Member

    Hi,

I've just read the full issue and I have the exact same issue.
I'm using ssh keys to login to github, this works everywhere except in vscode.
image

It does popup the browser login window
image

But clicking signing with browser just goes to a blank localhost page most of the time, once it did show me a successfully login you can go back to the app, but in vscode it was still complaining.

npx @emacs-grammarly/keytar-cli find-creds -s vscode-insidersvscode.github-authentication
Returns

[
  {
    account: 'github.auth',
    password: 'AQxlmzCMdedeFgtEgtjogfetgwt/lfsAefgAgteagt3geugtYerSgetOYrDD\n' +
      'Blablablabal(removed)'
  }
]

And this is Github Auth Log:
image

This only happens on my windows machine and funny to note that while trying to solve this, every single commits had a different user... not sure why but it might be related:
image

Originally posted by @melMass in #160649 (comment)

@yume-chan
Copy link
Contributor

To me the GitHub login popup only shows when I'm working on a private repo but incorrectly using https protocol for remote URL.

@melMass
Copy link

melMass commented Dec 20, 2022

Yep it happens only for https cloned repo but strangely also on public ones for me.

Someone mentioned it not being related to vscode "core"
I can debug if it's not but I'm 90% sure it is.
The remaining 10% behing the other official extensions "GitHub PR" etc...

@yume-chan
Copy link
Contributor

Oh yes it should also happen to https cloned public repositories, as long as the user has enabled 2FA on GitHub. I haven't work with public repos for some times.

It may still relate to vscode "core" because I remember it intercepts git authentication, but 100% not related to ssh keys (as stated in this issue's title)

@melMass
Copy link

melMass commented Dec 22, 2022

Ok it seems I solved the issue...
It was related to two things.

  • The first one was because only user.username & user.email were set in my git config. Somehow vscode's github extension requires user.name, it was quite hard to find as the error report weren't consistent/coherent but this is what solved the ability to "fetch/pull/push" from vscode.

  • The other issue that might be related to the popup (my guess is some kind of conflict between the two) was because when updating to Windows 11 I was asked if I wanted to use my Microsoft account to login... This messed up a bunch of stuffs like file permissions, introducing a new "user" and this.

I will close the issue but feel free to re-open

Edit: I cannot close it as I did not open it 😄

Thanks for the support.

@Tyriar
Copy link
Member

Tyriar commented Dec 27, 2022

@TylerLeonhardt is this caused by the github auth provider?

@Tyriar Tyriar added the info-needed Issue requires more information from poster label Dec 27, 2022
@TylerLeonhardt
Copy link
Member Author

@Tyriar no this dialog doesn't come from the GitHub Auth extension

@Tyriar Tyriar added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Dec 27, 2022
@VSCodeTriageBot
Copy link
Collaborator

We closed this issue because it is a question about using VS Code rather than an issue or feature request. Please search for help on StackOverflow, where the community has already answered thousands of similar questions. You may find their guide on asking a new question helpful if your question has not already been asked. See also our issue reporting guidelines.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 27, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster *question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

5 participants