-
Notifications
You must be signed in to change notification settings - Fork 30.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
Built-in GitHub extension still partly using signed out account #158733
Comments
Does the menu of the Accounts (person) icon at the bottom of the activity bar show that you are logged in on GitHub? |
Yes it does, also adding a video showing the issue. |
Still having this issue, and it means I can't do anything to do with Github on VS Code. |
I think I'm seeing the same thing with VScode within Github Codespaces :-/ |
Having the same issue:
Apparently VS Code is not using not either LOCAL (for specific Git repo) - which it SHOULD when interacting with remote repository VS CODE is using Windows Credential Manager There is only ONE GitHub authentication and THIS is what VS CODE is using. If you want to pull & push repositories as another user you have to DELETE this entry in Windows Credential Manager, authenticate using VS Code or git command line. Than you can push as a new user.
or: In both cases you need to again remove credentials in Credentials Manager and authenticate once again. |
So when you sign into a new account it presumably changes Credential Manager but not the git config, though likely changes both on the first sign in? Could be an issue with overwriting the git config or signing in after setup runs different code. |
No. Signing in / signing out in VS Code doesn't change Credential Manager entries at all. VS Code only ADDS entry to Credential Manager - if there is no authenticated user there.
Yes, those are some VS Code entries - don't have the "username" credentials. |
@TylerLeonhardt, could you please chime in on this one? Thanks! |
@dgxo where is this jeffthejeffthejeff account that is getting used signed in? Is it signed in to VS Code - do you see it in the Account menu? The We only support logging in to a single GitHub account in VS Code (for now) so whatever that account is signed in to should get used for the push... maybe that's the issue that needs to be addressed @lszomoru. |
In the account menu and everywhere I can look shows my usual account (dgxo), the old account does only seem to be used in Git. Considering VSCode includes its own Git executable (afaik), it looks like GCM isn’t updated (or fails to update) when logging out of the current user or into another one. When I get back to my PC I’ll test whether my globally installed Git uses this user as well. (plus if I still have this issue, haven’t used the GitHub integration since). I’ll also see if I can reproduce this on my laptop with a new install of Windows and VS Code at some point. |
@dgxo, VS Code does not ship it's own version of git.exe, but leverages the one that is installed on the machine, or remote machine (remote development scenarios). VS Code hooks into the git authentication pipeline, at the end making sure that VS Code only gets involved if there are no other authentication mechanism configured by the user (ex: Git Credential Manager). Do you have Git Credential Manager installed? Could you uninstall it and try without it? Thanks! |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
What this fixed cause I am still getting this problem. |
Have the same problem |
Type: Bug
1. Create a folder, with at least one file, and init a git repo using the GitHub tab2. Make a first commit, then publish the branch.
3. Use a public/private repository with any name.
4. Error shows up saying "You don't have permissions to push to ... on GitHub. Would you like to create a fork and push to it instead?".
5. Trying to fork it doesn't work because nothing has been pushed to the GitHub repository.
6. If you do add a file manually on the website and try to fork, the exact same error appears.
VS Code is trying to use another account that was previously signed out to perform certain actions, such as committing, but using the correct account in other cases.
Also in both of the logs in the .git folder include the old account name.
![git/logs/HEAD also wasn't sure if that was sensitive info probs not](https://user-images.githubusercontent.com/104234930/185894774-66e4255b-bf92-495a-afea-24c52a75776a.png)
![git/logs/refs/heads/master also wasn't sure if that was sensitive info probs not](https://user-images.githubusercontent.com/104234930/185894777-8f81c0bd-b8a3-4f36-af62-19b4cbe407d0.png)
VS Code version: Code 1.70.2 (Universal) (e4503b3, 2022-08-16T05:36:37.829Z)
OS version: Darwin x64 20.6.0 (MacOS)
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Extensions (46)
(2 theme extensions excluded)
A/B Experiments
The text was updated successfully, but these errors were encountered: