Sourcegraph GitHub permissions
Created by: benvenker
- Sourcegraph version: Sourcegraph.com
- Platform information: Mac OSX Big Sur 11.5.2 (20G95), Google Chrome v92.0.4515.159
Context
Doing my best to accurately remember how this occurred: I had signed up for Sourcegraph.com a few weeks ago (or so), linked repos, etc., but when I logged in today (2021-08-23), I had to go through a new user workflow - though the app remembered my connection to GitHub. I didn't click "update" on the screen that showed my code host connections (GH was listed with my avatar next to it), but just clicked "next".
After that, I think I saw an error message saying something along the lines of "syncing failed". I think I refreshed the page or clicked retry, if that was an option, but whatever it was didn't work.
After that, I went to the settings page, updated my GitHub configuration, had to reauthorize Sourcegraph in GitHub, and then was able to re-add repos that were there before. After I did that, I received an email from GitHub that said:
Previously, a third-party OAuth application (Sourcegraph.com) had user:email scope. It was recently granted an additional scope (repo).
I have search history showing up from thirteen days ago for the repos that were previously connected, so it would appear that somehow the GitHub authorization became un-synced.
Steps to reproduce:
- I'm guessing you would need to have been logged out of Sourcegraph.com for the last several days, or possibly you could attempt to log in on another computer or incognito window. The last time I would have logged in would've been before the official launch, if that's useful information. So maybe step one is to log in with a test user who hasn't logged in fresh since the official cloud launch?
- Follow user onboarding flow
- See that Sourcegraph already knows about your code host connection (in my case, GitHub)
- (I think) click "next" or the equivalent in the flow
- See that your repo syncing fails
- Navigate to the Settings page
- Navigate to the Code Host Connections panel
- Click "update" next to your previously-active code-hosts's connection
- Click on "Repositories" and add repositories successfully
Expected behavior:
My GitHub authorization works normally.
Actual behavior:
My GitHub authorization appeared to have been revoked or lost in some way.