Hyperledger Fabric:注册检查失败:Idemix 注册信息不存在

mor*_*eus 3 hyperledger-fabric

每当我们尝试运行时,我们都会收到此错误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
Run Code Online (Sandbox Code Playgroud)

我们该如何解决这个问题?

mor*_*eus 5

fabric-ca-client当找不到任何 X509 或 Idemix 身份时会发生这种情况。需要使用身份进行初始化(除非它被用户fabric-ca-client使用)。它首先尝试从文件或命令行参数中指定的位置enroll加载 X509 标识,该位置优先于mspdirfabric-ca-client-config.yaml-Mmspdir配置文件。如果无法找到 X509 身份,它将寻找 idemix 身份。如果此操作也失败,则会显示相关错误。

对于 X509 身份:

  • 它的公共证书需要位于signcerts
  • 并且私钥需要位于keystore
  • 并且颁发公钥/私钥对的机构的公共证书需要位于cacerts文件夹中(如果使用中间 ca,则其证书需要位于intermediatecerts

上面的所有文件夹都在mspdir