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

Don't allow multi-accounts for GitHub auth while it only supports 1 account #203850

Closed
AntonSedlak opened this issue Jan 31, 2024 · 9 comments · Fixed by #206847
Closed

Don't allow multi-accounts for GitHub auth while it only supports 1 account #203850

AntonSedlak opened this issue Jan 31, 2024 · 9 comments · Fixed by #206847
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug github-authentication Issues with the GitHub Authentication extension insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@AntonSedlak
Copy link

Does this issue occur when all extensions are disabled?: nonsence?

Accounts are managed by vscode? You need to decide where extensions get the information about which account to log in with.
However, by running without extensions, I understandably cannot verify the login.

VS Code Version: Version: 1.86.0-insider
Commit: 5d34400
Date: 2024-01-26T23:09:36.502Z
Electron: 27.2.3
ElectronBuildId: 26495564
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Linux x64 5.19.0-1010-nvidia-lowlatency

Steps to Reproduce:

  1. start vscode-insiders
  2. log to GitHub Copilot with account AAA
  3. Check AAA: Account Manage Trusted Extension - GitHub Copilot - OK working
  4. log to GitHub Pull request with account BBB
  5. Check BBB: Account Manage Trusted Extension - GitHub Pull request- OK both working
  6. restart vscode-insiders
  7. now cannot log to GitHub Copilot because it tries to use account BBB, I've checked log. I must relogin steps 2-5.

Account BBB was used before also for Copilot.
Now I have separate accounts, AAA paid for Copilot and the other BBB for repositories, but it's still not functional after restart.
I need Copilot so that I can manage the repository.
And why is Copilot attempting to use the BBB account for logging in when it doesn't even have the permissions for that by Manage Trusted Extension?

@gjsjohnmurray
Copy link
Contributor

Sounds like a duplicate of #127967

@TylerLeonhardt
Copy link
Member

Yeah we only really support a single GitHub account. The fact that you can log in to multiple GitHub accounts is a bug. I'm not really inclined to fix that bug as I would rather spend cycles supporting multi-account in GitHub...

@TylerLeonhardt TylerLeonhardt changed the title Using the wrong account to log in to GitHub Copilot. Don't allow multi-accounts for GitHub auth while it only supports 1 account Feb 2, 2024
@TylerLeonhardt TylerLeonhardt added github-authentication Issues with the GitHub Authentication extension bug Issue identified by VS Code Team member as probable bug labels Feb 2, 2024
@TylerLeonhardt TylerLeonhardt added this to the Backlog milestone Feb 2, 2024
@AntonSedlak
Copy link
Author

I was truly satisfied with having just one account for all repositories, but with the introduction of Copilot, our company requires having a special account for Copilot, which I cannot avoid, hence the second account.
But I have the Copilot service precisely to be able to write and modify projects from the original account.

It's not a problem to switch accounts, but the issue is having a paid service that stops functioning when I connect to GitHub differently. I want the paid service to work without limitations. Why am I paying for it?

Or is it necessary to move all projects elsewhere so that the Copilot service isn't intertwined with repository management services?

@neeraj-ec
Copy link

Agrees with @AntonSedlak. I have copilot access on my personal Github account and repo access with my Org Github account. If I install Github PR and issues extension and authenticate it with my org account, it makes copliot useless. For a while in past everything was working seamlessly with copilot extensions authenticated with my personal account and Github Pull Request and Issues with my org account. Now it's all intertwined making paid feature useless.

@DarKowGit
Copy link

I'm having the same issue as @neeraj-ec above. Copilot sub is on my personal GitHub account because I do contract work for an org who doesn't enable that by default. So I am logged in to two GitHub accounts. And I need to be. It was all working until this week. Now I've lost access to Copilot in my IDE. 🥺 This is a valid use case.

@yllekz
Copy link

yllekz commented Feb 13, 2024

I frequently have to jettison one of my two signed-in accounts to get Copilot to start working again. This workaround, while functional, is unsustainable due to having to choose between using Github Copilot or the ability to commit/push.

@karnigen
Copy link

The best approach is to let the Copilot use its authentication protocol, and for the repository, use SSH, after you setup ssh login, change local repository with git remote set-url.
Then there shouldn't be an issue using Copilot everywhere until VSCode resolves different logins for different services.

@StJohn3D
Copy link

StJohn3D commented Mar 4, 2024

This doesn't solve a problem, only puts a bandaid on a bigger issue. We have valid use cases to authenticate into extensions with different GitHub accounts. This needs to be supported.

@TylerLeonhardt
Copy link
Member

I want to set some expectation that multi-account for GitHub isn't supported today... and the workarounds folks have suggested have left users in confusing places and this has to be dealt with, which is what this issue tracks. Making it clear that we only support 1 account, at this time.

We do want to support multi-account and it's something we'd like to make progress on in the near future. It's not as simple as it sounds... check this comment of mine when I investigated the work involved:
#127967 (comment)

Until we can iron out the details and do this work in such a way that it makes sense, I want VS Code to be clear in what it supports.

The workaround I can recommend is installing VS Code & VS Code Insiders side-by-side and log in to two separate GitHub accounts there. Additionally, you could even use Settings Sync (with a common Microsoft account) so that your settings are synced between the two of them so it's easy to switch off.

@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Mar 4, 2024
yiliang114 pushed a commit to yiliang114/vscode that referenced this issue Mar 6, 2024
@amunger amunger added the verified Verification succeeded label Mar 26, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug github-authentication Issues with the GitHub Authentication extension insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants