【发布时间】:2015-10-26 14:49:14
【问题描述】:
我正在尝试设置 CouchDB 数据库复制,但两者都无法通过 Futon 和 cURL/CLI 工作:在这两种情况下都会出现以下错误消息:
{"error":"unauthorized","reason":"unauthorized to access or create database table1"}
curl -X POST http://127.0.0.1:5984/_replicate -d '{"source": "table1",
"user_ctx": {"name": "", "roles": ["admin"]}, "target":
"http://username:password@server:5984/table1", "create_target": false,
"continuous": true}' -H "Content-Type: application/json"
目标数据库通过用户名和密码进行保护,对于 HTTP 基本身份验证,我添加了凭据,如您所见。当我通过 Futon 创建复制文档时出现同样的错误。
感谢您的帮助。
【问题讨论】:
-
谁能帮忙解决这个问题?
标签: authentication couchdb replication