每当我们尝试运行fabric-ca-client
时,我们都会收到此错误。示例如下:
# fabric-ca-client register --url https://ica-org:7054 --id.name user-org --id.affiliation=org
2019/03/19 20:18:07 [INFO] Configuration file location: /home/fabric-ca-client-config.yaml
2019/03/19 20:18:07 [INFO] TLS Enabled
2019/03/19 20:18:07 [ERROR] Enrollment check failed: Idemix enrollment information does not exist
Error: Enrollment information does not exist. Please execute enroll command first. Example: fabric-ca-client enroll -u http://user:userpw@serverAddr:serverPort
我们该如何解决这个问题?
当fabric-ca-client
找不到任何X509或Idemix身份时,就会发生这种情况。 fabric-ca-client
需要使用身份进行初始化(除非用于enroll
用户)。它首先尝试从mspdir
文件或fabric-ca-client-config.yaml
命令行参数中指定的-M
位置加载X509标识,该参数优先于配置文件中的mspdir
。如果它无法找到X509身份,它将寻找一个idemix身份。如果此操作失败,则会显示相关错误。
对于X509身份:
signcerts
keystore
cacerts
文件夹中(如果使用中间ca,那么其证书需要在intermediatecerts
)上面的所有文件夹都在mspdir
下