./byfn.sh -m 生成物如何解决?

How to solve ./byfn.sh -m generate matter?

我是一名学生,正在研究我的第一个 hyperledger fabric 东西。我在创建 CA 时得到 ./byfn.sh -m 生成错误。 在该代码之后,我想输入 cryptogen generate --config=./crypto-config.yaml 命令。我安装了尽可能多的东西,但我仍然无法找出我的代码有什么问题。我还没有调用和查询,也许这很重要?请帮我看看该怎么做!

Generating certs and genesis block for with channel 'mychannel' and CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] Y
proceeding ...
/home/hyper/go/src/github.com/hyperledger/fabric-samples/first-network/../bin/cryptogen

##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/client.crt': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/ca.crt': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/client.key': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/admincerts/Admin@example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/signcerts/Admin@example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/tlscacerts/tlsca.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore/e9b68934ba6fd530ba9422eac568c5e01228798db9aae61f20632fd7ebf4fab9_sk': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/cacerts/ca.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/msp/admincerts/Admin@example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/msp/tlscacerts/tlsca.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/msp/cacerts/ca.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/admincerts/Admin@example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/orderer.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/keystore/e2af980aa602e1dc39339cd9f2e93fd16ea733be812620a818365f3254ee4f16_sk': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/ca/583b45a09c25a44fa125f545e31cf779b6f0807635d861d8185e1b9202c5e7ab_sk': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/ca/ca.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/example.com/tlsca/66d641f78a7d1a16e726047ab72ed93ba3e89d1c05ee82c81f17fc209ea56d06_sk': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/server.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/server.key': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/signcerts/peer1.org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/config.yaml': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/keystore/a6825b1d6a109937a89fe730ed75930cc202757dd7b677ca1d202f1a038b2ae5_sk': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.key': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/signcerts/peer0.org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/config.yaml': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/keystore/38870e1723c7312b4eaa88db761237c005f0e0a6b48da1dafb2033c29637b87c_sk': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/tls/client.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/tls/ca.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/tls/client.key': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/admincerts/User1@org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/signcerts/User1@org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/keystore/d3e281478303be02d62de2c980b4fdc6cb8a8313e37595784858076335ed2e5d_sk': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/tls/client.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/tls/ca.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/tls/client.key': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/5e60726fdb0b7586db3f4e13666267c091a57aae7d369a6dbfaaefe574d24a4a_sk': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/msp/config.yaml': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/ca/80e239f6b4de290e05978f68e2d9c0dbd4ccba6f4f43dff427b90f08f00f1760_sk': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org2.example.com/tlsca/b090c176c75334a33a2b4dee457d4fa03486d31166929a33892f81c85e32a854_sk': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.key': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/signcerts/peer1.org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/config.yaml': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/keystore/bc803a41a7853cba89703abfe194eb372fc0e60057722650c37fd3a65205a6f3_sk': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/signcerts/peer0.org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/config.yaml': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/keystore/f907b80c0bcd1c92175236c80ab980c21f7beb4ecffb79c101106f0367135c3e_sk': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/client.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/ca.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/client.key': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/c081b62eaf98ff063c83913cf3dffc5dbde2731326ddfd8cf3a5c9314508f923_sk': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/ca.crt': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.key': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/admincerts/User1@org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/efb1c7efebdf36932326b5c6f73223a7d195d79846583a2994274a3758d9b5d4_sk': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/msp/config.yaml': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/ca/4c8f64725fe53059ca94d63fb829e39183058bfdb264d03cf34c13074938effa_sk': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem': Permission denied
rm: cannot remove 'crypto-config/peerOrganizations/org1.example.com/tlsca/3b1bc12195cc46b306af3367489b1f6f9d2c23098a431a166575edf076f4e874_sk': Permission denied
+ cryptogen generate --config=./crypto-config.yaml
org1.example.com
2019-08-11 18:47:38.780 KST [bccsp_sw] storePrivateKey -> ERRO 001 Failed storing private key [ed62b7b33d8f771caa8f2faad8918187c4480aa81576f221bf2f85e74332be1e]: [open crypto-config/peerOrganizations/org1.example.com/ca/ed62b7b33d8f771caa8f2faad8918187c4480aa81576f221bf2f85e74332be1e_sk: permission denied]
Error generating signCA for org org1.example.com:
Failed storing key [ECDSAP256]: Failed storing ECDSA private key [open crypto-config/peerOrganizations/org1.example.com/ca/ed62b7b33d8f771caa8f2faad8918187c4480aa81576f221bf2f85e74332be1e_sk: permission denied]
+ res=1
+ set +x
Failed to generate certificates...

只需尝试 运行 在您的命令之前使用 sudo。如果仍然让我知道我可以帮助你 sudo ./byfn.sh -m 生成