microsoft / vscode-pull-request-github

GitHub Pull Requests for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github
MIT License
2.26k stars 554 forks source link

github pr extension is unable to sign in, while other extensions are fine #5785

Open syffs opened 4 months ago

syffs commented 4 months ago

Steps to Reproduce:

  1. Installed Github Pull Requests extension
  2. Signed in/out multiple times from github
  3. Github Copilot / Copilot chat extensions work well
  4. Github Pull Requests extension keep showing the same pane with "You have not yet signed in with GitHub", and clicking on Sign in does not do anything: image
bavarianbidi commented 4 months ago

I have a similar issue (and wanted to create an issue when i've seen this one :sweat_smile: ) where my enterprise-managed account (where the Copilot-license is handled) conflict with the PullRequest extension and my personal account which i'm using for normal operations.

My current findings so far:

My current solution: I've downgraded PR plugin to version v0.74.1 and with that, the Plugin only needs permissions to PullRequests. And my enterprise-managed account (with the Copilot license) is still able to stay logged in.

SANSKARJAIN2 commented 4 months ago

same. extension just continuously prompts for login, and once I log in, there's another prompt. seems login prompts are stacking and an infinite loop is going on.

Am0rfu5 commented 3 months ago

Version: 1.87.1 Commit: 1e790d77f81672c49be070e04474901747115651 Date: 2024-03-06T00:21:07.287Z Electron: 27.3.2 ElectronBuildId: 26836302 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Linux x64 6.5.0-14-generic

Same isse wth Github PR v0.82.0

Reproduced issue exactly as stated above by @syffs

Am0rfu5 commented 3 months ago

Spending 2 seconds reading the documentation fixed this for me. In my case I named the remote 'github' instead of 'origin' or 'upstream'. Just added that and it works fine.

Would add that having the Sign In fail makes sense BUT it isn't obvious what the issue is. Could add a note under that "Sign In" dialog to validate that the remote name matches, just for my fellow midwits who don't read the docs.

alexr00 commented 3 months ago

This requires copilot-scope access

This extension does not require a copilot scope. You can see all the scopes we ask for here:

https://github.com/microsoft/vscode-pull-request-github/blob/ea0930dba7ada0f67a2162e542fe13da5a9e287d/src/github/credentials.ts#L30-L32

I have a similar issue (and wanted to create an issue when i've seen this one 😅 ) where my enterprise-managed account (where the Copilot-license is handled) conflict with the PullRequest extension and my personal account which i'm using for normal operations.

@bavarianbidi, the problem that you encountered is that the GitHub Authentication extension doesn't support signing in with more than one GitHub account, though it did let you get into that state. If you sign out of one of the accounts you should be OK. @TylerLeonhardt FYI.

Github Pull Requests extension keep showing the same pane with "You have not yet signed in with GitHub", and clicking on Sign in does not do anything:

@syffs, can you please reproduce the issue then share the output from GitHub Pull Requests and GitHub Authentication?

Would add that having the Sign In fail makes sense BUT it isn't obvious what the issue is. Could add a note under that "Sign In" dialog to validate that the remote name matches, just for my fellow midwits who don't read the docs.

@Am0rfu5, you shouldn't see the "Sign In" button, but instead you should see a prompt to configure your remotes when you're signed in but we don't recognize any of your remotes: image If you see this again, can you please share the output from GitHub Pull Requests?

TylerLeonhardt commented 3 months ago

Multiple GitHub account in VS Code is tracked here: https://github.com/microsoft/vscode/issues/127967