SyncGateway Install Verification Walkthrough not working

So, I installed the server (as lined out under “Preparations”) and then followed the rest of the steps up until this:

Verify a Sync Gateway Install | Couchbase Docs

Namely, adding the user. Keep in mind, everything worked up until this point.

However, when I now copy the instructions almost verbatim (there’s a missing comma in the JSON after all)

curl  --location -g --request POST 'http://localhost:4985/traveldb/_user/' --header 'Content-Type: application/json' --header "Authorization: Basic $DIGEST" --data-raw '{ "name": "sgwuser1", "password": "passwordstring", "roles": ["stdrole"], "admin_channels": ["public"] }'

then I get a very descriptive:

{"error":"Forbidden","reason":""}

Please make special note of the empty string inside the reason. Very helpful. Yes, I did set the $DIGEST variable - after all, the previous commands worked.

So. What is going on here?

I’m also deeply impressed by this here:

(and the subsequent “Check the console logs” and “see: Redirect Console Logs”)

Because clicking on those links takes you precisely nowhere.

Thanks. I’ve opened a PR to correct the invalid JSON in that example and reported the broken links.

I followed the steps through on that page just to be sure I’m not missing anything, and rather annoyingly it does work for me…

So, I would double check and report back:

  • What version of CB Server (we added new Sync Gateway RBAC roles in 7.1)
  • In CB Server: What RBAC role the user being specified by $DIGEST is (is it just Sync Gateway and nothing more specific that has more restricted access)
  • And finally, what, if anything appears in the logs on Sync Gateway when you get the forbidden error?