Error creating user in CouchDB 1.0

后端 未结 4 622
执笔经年
执笔经年 2021-02-10 08:13

My system is ubuntu 10.04 and I have CouchDB 1.0 installed. I can create admin, or more admins, log in as admin and everything works fine.

Since 0.11 in CouchDB there i

4条回答
  •  再見小時候
    2021-02-10 09:06

    Ran into this issue myself and found that it was due to the fact that my name and the name portion of the _id string did not match:

    curl -X PUT https://admin:password@server:6984/_users/org.couchdb.user:dan \
        -H "Accept: application/json" \
        -H "Content-Type: application/json" \
        -d '{"name": "Dan", "password": "password", "roles": [], "type": "user"}'
    

    this does not work because the name portion of the _id dan from org.couchdb.user:dan does not match the name supplied Dan.

    The following works because the username matches (now both Dan)

    curl -X PUT https://admin:password@server:6984/_users/org.couchdb.user:Dan \
        -H "Accept: application/json" \
        -H "Content-Type: application/json" \
        -d '{"name": "Dan", "password": "password", "roles": [], "type": "user"}'
    

提交回复
热议问题