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

Connect to Github notification is noisy #1208

Closed
sandy081 opened this issue Nov 24, 2020 · 31 comments
Closed

Connect to Github notification is noisy #1208

sandy081 opened this issue Nov 24, 2020 · 31 comments
Assignees
Labels
bug Something isn't working needs-verification Request for verification
Milestone

Comments

@sandy081
Copy link

I am always seeing following notification when settings sync install Gitlens

image

Accounts icon already shows a number badge for this

image

So not sure if the notification is needed.

@moshfeu
Copy link

moshfeu commented Nov 28, 2020

Or, at least, add an option "don't show again" or something..

@eamodio
Copy link
Member

eamodio commented Nov 28, 2020

When are you seeing this? I would only expect it to show once, if you accept, for each machine (since I don't think we sync the auth). And once for each workspace, if you reject.

@sandy081 The reason I am showing this notification, is because without it the user just gets an allow authentication access prompt (from the built-in vscode auth) and they wouldn't know why.

@moshfeu
Copy link

moshfeu commented Nov 28, 2020

Now that I checked, I think one time for each project.

@eamodio
Copy link
Member

eamodio commented Nov 28, 2020

@moshfeu are you rejecting? or accepting?

@moshfeu
Copy link

moshfeu commented Nov 28, 2020

Rejecting 😳

@eamodio
Copy link
Member

eamodio commented Nov 28, 2020

Ah, so you want an always reject? Curiously, why don't you want it to connect to GitHub?

@moshfeu
Copy link

moshfeu commented Nov 28, 2020

For now.. I use to reject requests until I need the feature. Nothing personal :)

@eamodio
Copy link
Member

eamodio commented Nov 28, 2020

No worries, just curious. And FYI, the connection provides many passive features -- GitHub avatars, richer issue linking in hovers, rich PR linking in views, hovers, and annotations.

@moshfeu
Copy link

moshfeu commented Nov 28, 2020

Thanks! I really like this extension and I'll probably connect Github soon.

@the-exodus
Copy link

Ah, so you want an always reject? Curiously, why don't you want it to connect to GitHub?

Personally, I opted out once I saw the permissions requested 🤯

@flmn
Copy link

flmn commented Nov 29, 2020

I have the same question.
I just want to see blame message from git history, I don't want to see pull requests or something else.
Can provided an global option to disable connect to GitHub, if anyone want to disable it, just opt out.

@eamodio eamodio added bug Something isn't working and removed type: potential bug labels Nov 30, 2020
@eamodio eamodio self-assigned this Nov 30, 2020
@eamodio eamodio added this to the Soon™ milestone Nov 30, 2020
@64kramsystem
Copy link

Hello, experiencing the same. I keep getting notified on each VSC start, and it's irritating.

I also find the "Cancel" option (button) confusing, but this is a general UX design problem: does it mean "confirm negative intention" (in this case, don't show warning anymore), or "close widget without applying any change" (in this case, show warning again next time)?

Use case: my usage of GitLens is very limited, as I'm a heavy terminal user; additionally, as a general systems administration practice, I don't give permissions to services I don't require. Therefore I don't benefit from authorizing a remote connection.

@eamodio
Copy link
Member

eamodio commented Nov 30, 2020

Yeah, I will definitely be adding a way to completely opt-out soon. Sorry for the inconvenience.

@64kramsystem
Copy link

Yeah, I will definitely be adding a way to completely opt-out soon. Sorry for the inconvenience.

Thank you for the addon, it's impressive! 😃

@sandy081
Copy link
Author

@eamodio

The reason I am showing this notification, is because without it the user just gets an allow authentication access prompt (from the built-in vscode auth) and they wouldn't know why.

I think auth feature of VS Code shall be able to handle the UI instead of each extension come up with its own. I would request not to do this (any custom UI or notifications for authentication) instead please raise your concerns with auth feature to handle your request.

@RMacfarlane FYI

@jasonwilliams
Copy link

jasonwilliams commented Nov 30, 2020

It's showing every time I open a new workspace for me.

Ah, so you want an always reject? Curiously, why don't you want it to connect to GitHub?

I'm behind a corporate proxy and we use Github Enterprise so i can't use it here.
See #1210

@MaerF0x0
Copy link

MaerF0x0 commented Nov 30, 2020

why don't you want it to connect to GitHub?

The requested authorization is WAY too permissive

Screen Shot 2020-11-30 at 3 31 19 PM

This is much different than allowing me to initiate and control actions from my machine (via ssh keys etc) . Wont this generate an authorization that can be used offline, from their servers, without additional consent/initiation?

@eamodio
Copy link
Member

eamodio commented Dec 4, 2020

@MaerF0x0 Unfortunately currently the VS Code authentication APIs (because of limitations with GitHub auth) don't allow for any permission scopes less permissive than what I'm currently asking for (the repo scope) -- I wish I could just ask for read-only access, but that isn't currently possible.

@eamodio eamodio closed this as completed in 934ef04 Dec 4, 2020
@eamodio eamodio added the needs-verification Request for verification label Dec 4, 2020
@eamodio eamodio reopened this Dec 4, 2020
@eamodio
Copy link
Member

eamodio commented Dec 4, 2020

Can you please verify this fix in tomorrow's insiders edition? Be sure to disable/uninstall the stable version of GitLens first.

You can install the insiders edition from here.

I've reworked the notifications a bit to be clearer and added a "don't ask me again" type option. Unfortunately there still is 1 extra notification in certain cases, but that is because of microsoft/vscode#111529. So once that gets fixed I can remove it.

@eamodio eamodio added the pending-release Resolved but not yet released to the stable edition label Dec 4, 2020
@MaerF0x0
Copy link

MaerF0x0 commented Dec 4, 2020

@eamodio is it possible that I can generate my own token w/ pared down scopes to provide to the plugin via the settings.json?

to be honest I basically use gitlens in a read only fashion -- to see git praise, to check out branches, commit log etc.

That way it can only run from my machine too?

@eamodio
Copy link
Member

eamodio commented Dec 4, 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.

@MaerF0x0
Copy link

MaerF0x0 commented Dec 4, 2020

@eamodio try checking out the personal access token new page, there are lots and lots of options... I understand that vscode may not have the hooks to allow you to generate one for us, but maybe we could just generate a limited access one to use?

https://github.com/settings/tokens/new

@eamodio
Copy link
Member

eamodio commented Dec 4, 2020

Yes, but as I said -- the ONLY scope on that page that lets you get to repository information -- including PR & Issues -- is the repo scope -- and there is nothing more granular. If there was -- I would be asking for it -- since those are the exact same set of scopes I am choosing from.

@jasonwilliams
Copy link

jasonwilliams commented Dec 4, 2020

@eamodio is it possible that I can generate my own token w/ pared down scopes to provide to the plugin via the settings.json?

to be honest I basically use gitlens in a read only fashion -- to see git praise, to check out branches, commit log etc.

That way it can only run from my machine too?

I raised #1210 for exactly this. It’s not possible for us to use the authentication feature because we’re on enterprise and VSCode takes me to GitHub. Letting me
provide a token would fix this.

@eamodio
Copy link
Member

eamodio commented Dec 4, 2020

The VS Code team is trying to auth with GitHub using a GitHub app (rather than tokens) which should offer great granularity in permission requests, but we are currently blocked because of a bunch of technical limitations. So until those get unblocked there isn't much that can be done unfortunately 😢

@jasonwilliams Try the steps here: #1208 (comment) but again your PAT would have to have the repo scope for things to work.

@jasonwilliams
Copy link

Can you please verify this fix in tomorrow's insiders edition? Be sure to disable/uninstall the stable version of GitLens first.

You can install the insiders edition from here.

I've reworked the notifications a bit to be clearer and added a "don't ask me again" type option. Unfortunately there still is 1 extra notification in certain cases, but that is because of microsoft/vscode#111529. So once that gets fixed I can remove it.

Is this still only on insiders?
or on Stable too? I don't see a "don't ask me again" option on stable so was just wondering

@eamodio
Copy link
Member

eamodio commented Dec 16, 2020

Yeah still only insiders. Should be on stable I the next couple of days.

@pcgeek86
Copy link

Ah, so you want an always reject? Curiously, why don't you want it to connect to GitHub?

Why would I want to connect to GitHub? I can, and have been, using GitLens without connecting to GitHub. The constant prompt is irritating.

@mikeyhew
Copy link

Is there a way to connect to GitHub after opting out?

@eamodio
Copy link
Member

eamodio commented Dec 18, 2020

Why would I want to connect to GitHub?

@pcgeek86 Because of the features the integration enables. I'm glad that you are happy with what you have, but there are plenty of people that want/would benefit from a deeper integration with GitHub.

And I 100% agree that the constant prompt is totally aggravating, and I apologize for that (I switched from my own auth to using the vscode auth right before I shipped GitLens 11, and I really needed to do more scenario testing because of those changes). You can use the insiders edition today to get the fix for this, and I will be releasing it to stable very soon.

@mikeyhew You can click the Connect to GitHub... link in the hovers, or click on the Connect command for the remote in the Remotes view.

@eamodio eamodio removed the pending-release Resolved but not yet released to the stable edition label Dec 24, 2020
@eamodio eamodio modified the milestones: Soon™, Shipped Dec 24, 2020
@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 Jan 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working needs-verification Request for verification
Projects
None yet
Development

No branches or pull requests

10 participants