Reputation: 33
I checkout project fabric-samples and run file startFabric.sh to start Fabric blockchain network.
After that, I run node enrollAdmin.js
to enroll the new admin
Now, I want to use the command line of fabric-ca-client to add a new user to org1. I execute the commands below:
Access to ca_peerOrg1 docker
docker exec -it ca_peerOrg1 bash
I check the value of
$FABRIC_CA_CLIENT_HOME
is unset
$FABRIC_CA_HOME
is /etc/hyperledger/fabric-ca-server
/etc/hyperledger/fabric-ca-server
directory and check command fabric-ca-client
fabric-ca-client enroll -u http://admin:adminpw@localhost:7054
Anyone could help? Thanks for reading
Upvotes: 1
Views: 1498
Reputation: 31
I just encountered the same problem. For anyone who is interested, this error indicates fabric-ca-server is running with TLS enabled.
To get rid of this error, you need to make the following changes to the fabric-ca-client
command:
--tls.certfile
e.g. fabric-ca-client enroll -u https://admin:[email protected]:7054 --tls.certfiles /certs/ca/ca.org0.example.com-cert.pem
The TLS cert file was generated by fabric-ca-server at startup. The default file location is $FABRIC_CA_SERVER_HOME/tls-cert.pem
. Otherwise, the location is specified by $FABRIC_CA_SERVER_TLS_CERTFILE
or fabric-ca-server-config.yaml
Upvotes: 3