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

Source control have to CONSTANTLY log in #217667

Closed
Sof2222 opened this issue Jun 25, 2024 · 6 comments
Closed

Source control have to CONSTANTLY log in #217667

Sof2222 opened this issue Jun 25, 2024 · 6 comments
Assignees
Labels
github Github extension info-needed Issue requires more information from poster

Comments

@Sof2222
Copy link

Sof2222 commented Jun 25, 2024

Type: Bug

Hi!
since the last update I have to constantly be reauthenticating git by using gh auth login in the terminal in order for changes to sync to the repo. Have not had this issue before the most recent update but it is very infuriating and time consuming... I should not have to do this every 5 minutes when I need to sync it.

VS Code version: Code 1.90.2 (5437499, 2024-06-18T22:54:35.075Z)
OS version: Darwin arm64 23.4.0
Modes:

System Info
Item Value
CPUs Apple M2 (8 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 3, 3, 3
Memory (System) 24.00GB (0.07GB free)
Process Argv --crash-reporter-id 9a4d3e2f-7c10-446b-ba17-bf59a9425bde
Screen Reader no
VM 0%
Extensions (41)
Extension Author (truncated) Version
arepl alm 2.0.5
vscode-tailwindcss bra 0.10.5
vscode-deno den 3.37.1
es7-react-js-snippets dsz 4.4.3
prettier-vscode esb 10.4.0
codespaces Git 1.16.23
copilot Git 1.206.0
copilot-chat Git 0.16.1
vscode-github-actions git 0.26.3
live-sass gle 6.1.2
ai-docstring gra 0.1.3
vsc-python-indent Kev 1.18.0
vscode-latex mat 1.3.0
vscode-docker ms- 1.29.1
anaconda-extension-pack ms- 1.0.1
debugpy ms- 2024.6.0
isort ms- 2023.10.1
pylint ms- 2023.10.1
python ms- 2024.8.1
vscode-pylance ms- 2024.6.1
jupyter ms- 2024.5.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.18
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
remote-containers ms- 0.369.0
remote-ssh ms- 0.112.0
remote-ssh-edit ms- 0.86.0
cpptools ms- 1.20.5
remote-explorer ms- 0.4.3
vscode-typescript-next ms- 5.6.20240622
postman-for-vscode Pos 1.0.3
prisma Pri 5.15.0
nextjs-snippets Pul 1.0.2
vscode-yaml red 1.15.0
adobe-script-runner ren 0.6.0
intellicode-api-usage-examples Vis 0.2.8
vscodeintellicode Vis 1.3.1
vscode-icons vsc 12.8.0
vscode-import-cost wix 3.3.0
livecode xir 1.3.10
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
jchc7451:31067544
showvideoc:31016891
chatpanelc:31048052
dsvsc021:30996838
0ee40948:31013168
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupyter:31046869
legacy_priority:31077528

@lszomoru
Copy link
Member

@TylerLeonhardt, were there any GH auth related changes in the latest release?

@lszomoru lszomoru added the github Github extension label Jun 25, 2024
@TylerLeonhardt
Copy link
Member

I have to constantly be reauthenticating git by using gh auth login

This seems like an issue related to the gh CLI?... @Sof2222 do you see this when syncing your git repo from a terminal outside of VS Code?

@lszomoru remind me the order of operations... if gh is auth'd properly, I assume that will be used over the auth state in VS Code?

@TylerLeonhardt TylerLeonhardt added the info-needed Issue requires more information from poster label Jun 25, 2024
@lszomoru
Copy link
Member

VS Code always sits at the end of the auth pipeline so if there are any auth providers configured (ex: git credential manager) the will be honoured. If the auth request reaches VS Code, and is hosted on GitHub, the vscode.github extension implements a credential provider that will just use the github-authentication extension to get a token and use that for the git operation.

@Sof2222, do you mind providing a screenshot of the login prompt that you see for a git operation? Thanks!

@Sof2222
Copy link
Author

Sof2222 commented Jun 27, 2024

Hi!

Sorry for the late replies here, was out yesterday.

I actually have 2 github accounts - this one which has copilot access and another one which has repo access.

I have had this issue here for a while: https:/orgs/community/discussions/58082#discussioncomment-9856274

It is progressivly getting worse it seems though.

So this account is logged into github as it needs to be in order for copilot to work. The other account however is what I need to use to push to the repo. It used to be I could be logged into both accounts but maybe half a year ago something changed and I was no longer able to be logged into both in vs code itself and it was either 'one or the other' - so either this one was 'active' for all or the other one was active for all.

I found a workaround by logging in with gh auth login with the one I wanted to push to github - only had to redo this when I restarted my computer at that stage.

Since I updated vs code very recently however, I have been constantly (like i have to fill it in twice and it is asking near constantly) the 'git-credential-osxkeychain wants to access key "github.com" in your keychain' (adding as an attachment). Perhaps there is an issue there - (note I have not updated my OS or anything else within the last few months)

I think it is accessing the one stored on this account (which has copilot but not repo access) so when I go to push, it tells me I have no access. I then have to login again with gh auth login before it pushes through to the repo. (but then it pops up asking for the keychain access again)

Am unsure if my flow is the most ideal, but its what I figured out to work for me (I use the source control tab to push to git)

Screenshot 2024-06-27 at 10 58 09 AM

I am guessing that it is constantly asking for the keychain is overriding gh auth login? But yet again - I am not sure at all about the backend of how git works (am no expert there, just using it)

@TylerLeonhardt
Copy link
Member

The dialog you're showing isn't related to VS Code it's your git credential store which is populated by the CLI when you do gh auth login. For why you see that dialog so much, you should open an issue here:
https:/cli/cli

For your scenario of having Copilot... you'll want to sign in to VS Code with that account that has Copilot. We have multi-account support in VS Code tracked here: #127967

Copy link

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!

@vs-code-engineering vs-code-engineering bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
github Github extension info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants