简体   繁体   中英

Unable to see the user in peer docker container that got created in fabric-ca container

I'm running a Hyperledger fabric network which is the sample basic-network. My configuration is one peer, one ca and one orderer. In crypto-config.yml , I've one peer and only one user.

I generated the certificates for the network by running the command cryptogen generate --config=./crypto-config.yml .

When I looked for the user certificate in the fabric-ca docker container, I couldn't find it which to some extent makes sense because certificates got generated using the cryptogen tool. But now I've registered and enrolled a new user in fabric-ca container and I want him to invoke the chaincode. How can I do that? How can I pass the certificates from fabric-ca to peer container? And let's suppose even if I do that using docker cp command, will it be the correct way to pass the certificates?

What will I need to do if I want the new user to invoke the chaincode from cli container?

With the basic-network, when the cli container is created an environment variable is set: CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp

You will need to reset this variable to direct to the folder for your new ID then you should be able to use the peer chaincode invoke command which will use the new credentials.

(I found a small problem when testing this - the invoke command is looking for an admincerts subfolder under msp so I just copied the signcerts folder to admincerts.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM