现在我完成了所有事情,并将用户卡导入钱包。但是现在当我尝试向端点发出API请求时,我得到了这个输出:
{
"error": {
"statusCode": 500,
"name": "Error",
"message": "Error trying login and get user Context. Error: Error trying to enroll user. Error: Enrollment failed with errors [[{\"code\":20,\"message\":\"Authorization failure\"}]]",
"stack": "Error: Error trying login and get user Context. Error: Error trying to enroll user. Error: Enrollment failed with errors [[{\"code\":20,\"message\":\"Authorization failure\"}]]\n at HLFConnection.login (/home/composer/.npm-global/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:477:30)\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:189:7)"
}
}
已经搜索过解决方案但找不到任何人。
我的解决方案是:
1)出口卡
composer card export -c admin@network -f admin-plus-cert.card
2)删除旧卡
composer card delete -c admin@network
3)导入新卡
composer card import -f admin-plus-cert.card