-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fixes #1968, #1027 - Fetch-> fatal: could not read Username #2481
Conversation
3484c12
to
626ffc5
Compare
626ffc5
to
8b2bd18
Compare
…Username Uses the core git fetch command instead of a command-line git fetch so VsCode will prompt the user for their username and password. Pull & push also use their corresponding core commands.
8b2bd18
to
40b5fd3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing @foxwoods369! Looks good to me 🎉
Hello, I'm now having the error again, same as #1027. I'm sshing to an ubuntu 22.04 remote compute from an windows 10 PC, and I signed in to github in vscode. The builtin source control works fine, but the branch fetching in gitlens panel gives the following error. However, when I click the globe button to open remote branch, it also opens the correct branch in my browser. The remote branch is set with https, if I swtich to ssh, the builtin source control doesn't work anymore, since I don't have my ssh code in github (but I think this is the reason for signing in with vscode). Maybe I'm getting the fix wrong, but could you tell me how to get this PR? I've already updated to the latest gitlens extension. (V14.0.1 as I can see) Here is the output by gitlens.
Here is the version info from vscode.
|
@Weijiang-Xiong I would like your help to test a potential fix to your issue. Currently, when using a fetch without a branch specified, we use the built-in SCM's version of fetch. When a branch is specified for the fetch, we use our own, which is why you would be getting the error output there and not in other fetch cases. We are trying to determine if this is because of the difference between the SCM's auth for git operations and our own. In tomorrow's pre-release of GitLens, we've introduced an experimental option where we pull in some of the Git environment of the SCM into our own Git implementation. We would like your help to test the branch fetch that is failing for you above by doing the following:
|
Thank you @axosoft-ramint ! I switched to the pre-release, and added the setting as you said, and now I can refresh the branches without problem! |
@Weijiang-Xiong Glad to hear it. Thank you! Will follow up with a few other users having the same issue to confirm, but it seems likely that the issue was indeed related to the difference between the auth used by built-in SCM git and GitLens' git. |
Description
Uses the core git fetch command instead of a command-line git fetch so VsCode will prompt the user for their username and password. Pull & push also use their corresponding core commands.
Checklist
Fixes $XXX -
orCloses #XXX -
prefix to auto-close the issue that your PR addresses