环境:fabric v2.2.0
执行fabric-sampke/test-network
中账本交互指令的时报错
peer chaincode query -C mychannel -n basic -c '{"Args":["ReadAsset","asset6"]}'
报错如下:
Cannot run peer because cannot init crypto, specified path "/home/yujialing/go/src/github.com/hyperledger/fabric-samples/config/msp" does not exist or cannot be accessed: stat /home/yujialing/go/src/github.com/hyperledger/fabric-samples/config/msp: no such file or directory
原因是没有配置环境变量,以网络中的某个组织的某个节点进行交互
比如配置环境变量成为Org1
Peer0
的角色
export