vscode-pull-request-github icon indicating copy to clipboard operation
vscode-pull-request-github copied to clipboard

Support multiple GitHub accounts

Open skorpions2000 opened this issue 3 years ago • 12 comments

Possibly related to closed issue https://github.com/microsoft/vscode-pull-request-github/issues/1941 but am reporting again as instructed at the bottom of the thread on that issue.

Extension version: v0.42.0
VSCode Version: 1.67.2
OS: Windows 10

изображение

skorpions2000 avatar Jun 07 '22 07:06 skorpions2000

@skorpions2000 thanks for making a new issue! Are you using GitHub enterprise?

Can you also please share the output from "GitHub Pull Requests"?

alexr00 avatar Jun 07 '22 12:06 alexr00

Also using GitHub Enterprise Server. From Output:

[Info] GitHubRepository> Fetching pull requests for branch failed: HttpError: Not Found [Info] GithubRepository> Unable to fetch issues without milestone: Error: GraphQL error: Could not resolve to a Repository with the name 'org/repo' [Info] GithubRepository> Unable to fetch issues with query: Error: GraphQL error: Could not resolve to a Repository with the name 'org/repo'

jasonmacallister avatar Jun 08 '22 15:06 jasonmacallister

There has been a lot of work done in August and September to support GitHub Enterprise better. Could you try again with the latest version of the extension?

alexr00 avatar Dec 09 '22 13:12 alexr00

I'm seeing this same issue with the same log output as shown by @jasonmacallister above with the latest v0.56.0.

I'm not using GitHub enterprise. At least I don't think so. Is there a place where I can verify this?

ATM I'm not able to use the extension at all due to this error...

FYI, the url shown in the error toaster is correct. At least it's the same URL as GitHub shows in the upper right corner of the repo as SSH clone url.

Not sure if relevant but using VSCode actions like Git: Pull works as expected.

CombeeMike avatar Dec 20 '22 10:12 CombeeMike

I'm not using GitHub enterprise. At least I don't think so. Is there a place where I can verify this?

If your clone url is github.com then you are not using GitHub Enterprise. Is it a github.com url?

alexr00 avatar Dec 20 '22 14:12 alexr00

I'm not using GitHub enterprise. At least I don't think so. Is there a place where I can verify this?

If your clone url is github.com then you are not using GitHub Enterprise. Is it a github.com url?

Ok, then I'm not using enterprise. The url is [email protected]:abc/xyz.git.

CombeeMike avatar Dec 20 '22 14:12 CombeeMike

@CombeeMike in that case can you please do the following:

  • Set "githubPullRequests.logLevel": "debug"
  • Reload the window
  • Share the output from GitHub Pull Request. If you don't want to share it here (as it may contain data about your repository), you can send it to the email in my profile.

alexr00 avatar Dec 20 '22 15:12 alexr00

@alexr00 I just realized that this was my own fault. I had 2 GitHub accounts connected to VSCode where 1 is a private and the other a work account. I'm using the PR extension exclusively with my work account and the repo I'm using it with is a private one. After completely removing the private account from VSCode, the PR extensions asked me to sign in, which I then did with the work account.

This solved the issue for me, so it seems like the PR extension was somehow erroneously connected/signed in with my private account which does not have access to the repo I was having troubles with.

Sorry for wasting your time with this, I could have also figured this out before asking for help here 🙈

CombeeMike avatar Dec 22 '22 10:12 CombeeMike

@CombeeMike thanks for all details, they might help someone else who comes across this issue. Some other thoughts:

  • The extension could suggest that you might be using the wrong account when we see this error.
  • Multiple accounts is not well supported. This is something we know about and we can document it better (until such time as it is well supported, which we want to do but it's not currently on the plan).

alexr00 avatar Dec 22 '22 14:12 alexr00

I am in a similar situation, where i have 2 githubs, 1 work, 1 personal, and the extension appears to be setup with the personal, but i see no way to telling it to use the work one instead

matt-unosquare avatar Dec 06 '23 19:12 matt-unosquare

+1 extension has setup on my personal account. I do not wish to use multiple accounts - can I still atleast tell the extension to use which account?

z-budhirajamadhav avatar Apr 19 '24 19:04 z-budhirajamadhav

The only option until we have https://github.com/microsoft/vscode/issues/127967 is to sign out of the account you don't want to use.

As suggested here you could use VS Code Insiders for one account and VS Code stable for another.

alexr00 avatar Apr 22 '24 09:04 alexr00