Impossible to sync repositories on new instance on latest insiders (external service id=1 config error: failed to parse JSON: [InvalidSymbol])
Created by: slimsag
- Run the latest
sourcegraph/server:insiders
image (make sure it is up to date and starting clean):
docker pull sourcegraph/server:insiders
rm -rf ~/.sourcegraph/
docker run --publish 7080:7080 --publish 127.0.0.1:3370:3370 --rm --volume ~/.sourcegraph/config:/etc/sourcegraph --volume ~/.sourcegraph/data:/var/opt/sourcegraph sourcegraph/server:insiders
- Go to Manage repositories and add GitHub.com repositories with the very basic config:
{
"url": "https://github.com",
"token": "<your token with repo scope>",
"orgs": []
}
- Repositories do not clone, there is an error in the code host cloud icon indicator (impossible for me to copy the text due to issue #14643 (closed)):
The server logs indicate:
23:38:12 frontend | ✱ Sourcegraph is ready at: http://127.0.0.1:7080
23:55:04 repo-updater | t=2020-10-12T23:55:04+0000 lvl=warn msg="Handling rate limiter sync" err="getting rate limit configuration: loading service configuration: failed to parse JSON: [InvalidSymbol]"
23:55:04 repo-updater | t=2020-10-12T23:55:04+0000 lvl=eror msg="Getting normalised URL from service" err="parsing config: failed to parse JSON: [InvalidSymbol]"
23:55:08 repo-updater | t=2020-10-12T23:55:08+0000 lvl=eror msg="Repository authz config was invalid (errors are visible in the UI as an admin user, you should fix ASAP). Restricting access to repositories by default for now to be safe." seriousProblems="[Could not parse config of external service 1: failed to parse JSON: [InvalidSymbol]]"
23:55:13 repo-updater | t=2020-10-12T23:55:13+0000 lvl=eror msg="Repository authz config was invalid (errors are visible in the UI as an admin user, you should fix ASAP). Restricting access to repositories by default for now to be safe." seriousProblems="[Could not parse config of external service 1: failed to parse JSON: [InvalidSymbol]]"
23:55:13 repo-updater | t=2020-10-12T23:55:13+0000 lvl=warn msg="Marked record as errored" name=repo_sync_worker id=1 err="syncer.sync.sourced: 1 error occurred:\n\t* external service id=1 config error: failed to parse JSON: [InvalidSymbol]\n\n"
23:55:18 repo-updater | t=2020-10-12T23:55:18+0000 lvl=eror msg="Repository authz config was invalid (errors are visible in the UI as an admin user, you should fix ASAP). Restricting access to repositories by default for now to be safe." seriousProblems="[Could not parse config of external service 1: failed to parse JSON: [InvalidSymbol]]"
23:55:23 repo-updater | t=2020-10-12T23:55:23+0000 lvl=eror msg="Repository authz config was invalid (errors are visible in the UI as an admin user, you should fix ASAP). Restricting access to repositories by default for now to be safe." seriousProblems="[Could not parse config of external service 1: failed to parse JSON: [InvalidSymbol]]"
...
Connecting to the psql DB shows the config is not the previously entered JSON (encrypted I assume?):
sourcegraph=# select kind,display_name,config from external_services;
kind | display_name | config
--------+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
GITHUB | GitHub | 98194a$QxF90bX560zokRVhWddUTOBcSLjKy+ZZ5D/1au6heihLLgUCtUVk4iEa7AlUaM0kdeU2sWz9oWtxUD+OV/zTFkparDwjWEtgTe+uouX8Nh9SAH8DHRM26/7OfXtpOu3NQedRqbW72OvhfWafm2SVWXtnM7F28hmgp59ujCRdyClI8Q==
(1 row)