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

Add rich integration for Github Enterprise #1210

Closed
jasonwilliams opened this issue Nov 25, 2020 · 12 comments
Closed

Add rich integration for Github Enterprise #1210

jasonwilliams opened this issue Nov 25, 2020 · 12 comments
Assignees
Labels
feature New feature or request
Milestone

Comments

@jasonwilliams
Copy link

jasonwilliams commented Nov 25, 2020

I've tried setting up a remote to an Enterprise Server using "gitlens.remotes": [{ "domain": "git.corporate-url.com", "type": "GitHub", "protocol": "https" }] but this triggers an authentification workflow that takes me to github.com. Even though I authenticate correctly there it's the wrong Github so it this doesn't work. (also is there a way to reset this?)

Can i have an option to pass in a token instead from my Enterprise Github account?

I can't seem to avoid the "The extension 'GitLens — Git supercharged' wants to sign in using GitHub."

Github Pull Request extension allows the user to do this:
https://github.com/microsoft/vscode-pull-request-github/wiki#personal-access-token-authentication

Now i just get:

[2020-11-25 13:00:15:177] GitHubApi.getPullRequestForCommit
Error: Bad credentials

in my logs when i run commands that need the server.

@jasonwilliams jasonwilliams added the feature New feature or request label Nov 25, 2020
@jasonwilliams jasonwilliams changed the title Option to pass an API Key for Github Enterprise users? Option to pass a token for Github Enterprise users? Nov 25, 2020
@jasonwilliams
Copy link
Author

jasonwilliams commented Dec 7, 2020

I believe so -- during the VS Code auth flow (when it opens the browser window), I believe there is an entry in the statusbar that you can click that will prompt for a PAT. But I don't believe you can create a PAT with any less scopes than I am currently asking for -- because repo info, prs, issues etc are all under the repo scope.

Weird i tried creating a token with repo scope and it failed for me:

Below log from "Github Authentification"

[Info  - 17:11:35.813] Logging in...
[Info  - 17:12:44.990] Treating input as token
[Info  - 17:12:44.990] Getting user info...
[Error  - 17:12:45.321] Getting account info failed: Unauthorized

I think it could be trying to log in to the wrong github

im going to assume its related to this microsoft/vscode-pull-request-github#1755

@eamodio
Copy link
Member

eamodio commented Dec 7, 2020

Unfortunately this is an issue with the VS Code auth provider: microsoft/vscode#112043

Until that issue is resolved, this unfortunately will be blocked (as I don't want to get into managing/storing secrets myself).

@eamodio eamodio added blocked: vscode Caused by or dependent on a VS Code issue or feature blocked Blocked or caused by an upstream issue or feature labels Dec 7, 2020
@jasonwilliams
Copy link
Author

jasonwilliams commented Dec 7, 2020

no problem, thanks for raising upstream @eamodio @RMacfarlane !

@eamodio eamodio added this to the Backlog milestone Dec 23, 2020
@jasonwilliams
Copy link
Author

jasonwilliams commented May 7, 2021

Hey @eamodio microsoft/vscode#112043 has now been fixed and merged

@jasonwilliams
Copy link
Author

jasonwilliams commented May 10, 2021

This might be useful, the PR @kabel did to make use of the new enterprise provider in Github Pull Requests Extension - microsoft/vscode-pull-request-github#2468

@kglickman
Copy link

This feature has been working fine for me for months and suddenly stopped working. I think something may have gotten broken in VSCode version 1.62.3, though I haven't proven it yet. @eamodio Do you know anything about this?

@kglickman
Copy link

Yes, I have confirmed that it broke in 1.62.3. I've downgraded to 1.62.2 and it works again. Can you please pursue with VSCode since you understand the authentication mechanism and I do not? I think the fix for this defect is a likely candidate for the breaking change.

@TheSharpieOne
Copy link

I am running into this same issue with 1.62.3. As for also is there a way to reset this? You can go to "Manage Trusted Extensions" from the "Accounts" button (above the settings widget) at the bottom left then hover over your github name. It will open a menu allowing you to deselect extensions that have access.
image
image

@jasonwilliams
Copy link
Author

jasonwilliams commented Feb 8, 2022

@kglickman @TheSharpieOne is this still broken?

@jasonwilliams
Copy link
Author

jasonwilliams commented Feb 8, 2022

Unfortunately this is an issue with the VS Code auth provider: microsoft/vscode#112043

Until that issue is resolved, this unfortunately will be blocked (as I don't want to get into managing/storing secrets myself).

@eamodio I don't think this needs the "blocked" tags anymore as microsoft/vscode#112043 has been resolved for quite some time. (via microsoft/vscode#115940)

@kglickman
Copy link

This is working for me again in VSCode 1.64.0 but I have not gone back to figure out when it was fixed.

forestaa added a commit to forestaa/vscode-gitlens that referenced this issue Jun 4, 2022
forestaa added a commit to forestaa/vscode-gitlens that referenced this issue Jun 4, 2022
forestaa added a commit to forestaa/vscode-gitlens that referenced this issue Jun 4, 2022
forestaa added a commit to forestaa/vscode-gitlens that referenced this issue Jun 4, 2022
@eamodio eamodio removed blocked: vscode Caused by or dependent on a VS Code issue or feature blocked Blocked or caused by an upstream issue or feature labels Jul 13, 2022
@eamodio eamodio self-assigned this Jul 13, 2022
@eamodio eamodio modified the milestones: Backlog, 12.2 Jul 13, 2022
@eamodio eamodio changed the title Option to pass a token for Github Enterprise users? Add rich integration for Github Enterprise Jul 13, 2022
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants