couchdb
couchdb copied to clipboard
CouchDB replication unauthorized error
Description
Passing through the introduction in docs and some problems with authorization occurs.
{"error":"unauthorized","reason":"unauthorized to access or create database http://127.0.0.1:5984/albums/"}
Steps to Reproduce
In chapter 1.7.4 execute the post request:
curl -vX POST http://admin:[email protected]:5984/_replicate \
-d '{"source":"http://127.0.0.1:5984/albums","target":"http://127.0.0.1:5984/albums-replica"}' \
-H "Content-Type: application/json"
after creating a target database.
Expected Behaviour
CouchDB returns JSON with
"ok": true
Your Environment
- CouchDB version used: 3.2.2
- Browser name and version: curl 7.68.0
- Operating system and version: Ubuntu 20.04.3
Thanks for your report @billoty. It seems that section of the documentation hasn't been updated since we switched to requiring an admin password to be set up by default. Try to add admin:password for the source and target endpoint url and it should work.
hi @nickva , I would like to work on this issue if it is still open
@ryuusama09 thanks for wanting to take a look!
The main task would be to go through the replication (and possibly other docs) in the src/docs folder and see if there are any tutorial URL links without a username and password, and update them to have a user name and password like adm:pass, admin:password or similar.