Skip to content

It is not clear how to configure Sourcegraph to just access public repositories

Created by: slimsag

A user wanted to trial sourcegraph without entering their private code.

He got to external service configuration page with no trouble, but when he got there he wasn’t sure how to get just his public repositories into Sourcegraph and assumed giving it an access token would do that.

He decided to save without entering a GitHub access token, which gave him an error when saving: `repositoryQuery array must have at least 1 items" After fixing that, he got an unfriendly error:

External service created, but we encountered a problem while validating the external service: failed to list GitHub repositories for search: page=1, searchString="user:Andoryuuta": request to http://127.0.0.1:3180/search/repositories?page=1&per_page=100&q=user%3AAndoryuuta returned status 401: Bad credentials
  1. The main problem here is that it is not clear how to configure Sourcegraph to just access public repositories.
  2. If we require an access token we should inform users of that in our JSON schema not through a bad error message.