root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# ls
channel-artifacts crypto testchannel.block
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channle ls
Error: unknown command “channle” for “peer”

Did you mean this?
channel

Run ‘peer --help’ for usage.
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel ls
Operate a channel: create|fetch|join|list|update|signconfigtx|getinfo.

Usage:
peer channel [command]

Available Commands:
create Create a channel
fetch Fetch a block
getinfo get blockchain information of a specified channel.
join Joins the peer to a channel.
list List of channels peer has joined.
signconfigtx Signs a configtx update.
update Send a configtx update.

Flags:
–cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
–certfile string Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the orderer endpoint
–clientauth Use mutual TLS when communicating with the orderer endpoint
–connTimeout duration Timeout for client to connect (default 3s)
-h, --help help for channel
–keyfile string Path to file containing PEM-encoded private key to use for mutual TLS communication with the orderer endpoint
-o, --orderer string Ordering service endpoint
–ordererTLSHostnameOverride string The hostname override to use when validating the TLS connection to the orderer.
–tls Use TLS when communicating with the orderer endpoint

Global Flags:
–logging-level string Default logging level and overrides, see core.yaml for full syntax

Use “peer channel [command] --help” for more information about a command.
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel list
2018-12-12 07:52:31.312 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
Channels peers has joined:
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# ls
channel-artifacts crypto testchannel.block
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel join -b testchannel.block
2018-12-12 07:53:06.800 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-12-12 07:53:06.924 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode install -l golang -n testcc -p ​​​github.com/chaincode​​​ -v v1.0
2018-12-12 07:54:07.280 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-12-12 07:54:07.280 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2018-12-12 07:54:07.669 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:“OK” >
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -o ​​​orderer.wilsoner.com:7050​​​ -C testchannel -l golang -n testcc -v v1.0 --tls true --cafile $CAFILE -P “AND (‘OrgGoMSP.member’, ‘OrgCppMSP.member’)” -c ‘{“Args”:[“init”, “a”, “100”, “b”, “200”]}’
2018-12-12 07:54:31.182 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-12-12 07:54:31.182 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: could not assemble transaction, err Proposal response was not successful, error code 500, msg chaincode with name ‘testcc’ already exists
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# ---------------------
bash: ---------------------: command not found
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer#
Display all 928 possibilities? (y or n)
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# 93
bash: 93: command not found
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# CAFILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/wilsoner.com/orderers/orderer.wilsoner.com/msp/tlscacerts/tlsca.wilsoner.com-cert.pemCSDN
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# CAFILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/wilsoner.com/orderers/orderer.wilsoner.com/msp/tlscacerts/tlsca.wilsoner.com-cert.pem
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# #
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# CAFILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/wilsoner.com/orderers/orderer.wilsoner.com/msp/
tlscacerts/tlsca.wilsoner.com-cert.pem
channel-artifacts/ crypto/ testchannel.block
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# CAFILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/wilsoner.com/orderers/orderer.wilsoner.com/msp/
tlscacerts/tlsca.wilsoner.com-cert.pem
channel-artifacts/ crypto/ testchannel.block
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# CAFILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/wilsoner.com/orderers/orderer.wilsoner.com/msp/
tlscacerts/tlsca.wilsoner.com-cert.pem
channel-artifacts/ crypto/ testchannel.block
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# CAFILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/wilsoner.com/orderers/orderer.wilsoner.com/msp/tlscacerts/tlsca.wilsoner.com-cert.pem
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -o ​​​orderer.wilsoner.com:7050​​​ -C testchannel -l golang -n testcc -v v1.0 --tls true --cafile $CAFILE -P “AND (‘OrgGoMSP.member’, ‘OrgCppMSP.member’)” -c ‘{“Args”:[“init”, “a”, “100”, “b”, “200”]}’
2018-12-12 07:55:29.600 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-12-12 07:55:29.600 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: could not assemble transaction, err Proposal response was not successful, error code 500, msg chaincode with name ‘testcc’ already exists
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode query -n testcc -C testchannel -c ‘{“Args”:[“query”, “a”]}’
100
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# echo $CORE_PEER_ADDRESS
​​​peer1.orgcpp.wilsoner.com:7051​​​ root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_ADDRESS=​​peer0.orggo.wilsoner.com:7051​​​ root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_LOCALMSPID=OrgGoMSP
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/orggo.wilsoner.com/users/Admin@orggo.wilsoner.com/msp
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/orggo.wilsoner.com/peers/peer0.orggo.wilsoner.com/tls/ca.crt
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/orggo.wilsoner.com/peers/peer0.orggo.wilsoner.com/tls/server.crt
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/orggo.wilsoner.com/peers/peer0.orggo.wilsoner.com/tls/server.key
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel join -b testchannel.block
2018-12-12 08:01:44.925 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-12-12 08:01:45.051 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode install -l golang -n testcc -p ​​​github.com/chaincode​​​ -v v1.0
2018-12-12 08:03:12.017 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-12-12 08:03:12.017 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2018-12-12 08:03:12.253 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:“OK” >
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -o ​​​orderer.wilsoner.com:7050​​​ -C testchannel -l golang -n testcc -v v1.0 --tls true --cafile $CAFILE -P “AND (‘OrgGoMSP.member’, ‘OrgCppMSP.member’)” -c ‘{“Args”:[“init”, “a”, “100”, “b”, “200”]}’
2018-12-12 08:03:41.322 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-12-12 08:03:41.322 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: could not assemble transaction, err Proposal response was not successful, error code 500, msg chaincode with name ‘testcc’ already exists
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode query -n testcc -C testchannel -c ‘{“Args”:[“query”, “a”]}’
100
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# echo $CORE_PEER_ADDRESS
​​​peer0.orggo.wilsoner.com:7051​​​ root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_ADDRESS=​​peer1.orggo.wilsoner.com:7051​​​ root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_LOCALMSPID=OrgGoMSP
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/orggo.wilsoner.com/users/Admin@orggo.wilsoner.com/msp
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/orggo.wilsoner.com/peers/peer1.orggo.wilsoner.com/tls/ca.crt
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/orggo.wilsoner.com/peers/peer1.orggo.wilsoner.com/tls/server.crt
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/orggo.wilsoner.com/peers/peer1.orggo.wilsoner.com/tls/server.key
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# echo $CORE_PEER_ADDRESS
​​​peer1.orggo.wilsoner.com:7051​​​ root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel join -b testchannel.block
2018-12-12 08:25:26.198 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-12-12 08:25:26.322 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode install -l golang -n testcc -p ​​​github.com/chaincode​​​ -v v1.0
2018-12-12 08:26:23.503 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-12-12 08:26:23.503 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2018-12-12 08:26:23.740 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:“OK” >
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode query -n testcc -C testchannel -c ‘{“Args”:[“query”, “a”]}’
100
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# ROORCERT1=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/orggo.wilsoner.com/peers/peer0.orggo.wilsoner.com/tls/ca.crt
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# ROORCERT2=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/orgcpp.wilsoner.com/peers/peer1.orgcpp.wilsoner.com/tls/ca.crt
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode invoke -o ​​​orderer.wilsoner.com:7050​​​ --tls true --cafile $CAFILE -C testchannel -n testcc -c ‘{“Args”:[“invoke”,“a”,“b”,“10”]}’ --peerAddresses ​​peer0.orggo.wilsoner.com:7051​​​ --tlsRootCertFiles $ROORCERT1 --peerAddresses ​​peer1.orgcpp.wilsoner.com:7051​​​ --tlsRootCertFiles $ROORCERT2
2018-12-12 08:30:20.637 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 001 Chaincode invoke successful. result: status:200
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode query -n testcc -C testchannel -c ‘{“Args”:[“query”, “a”]}’
90
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode query -n testcc -C testchannel -c ‘{“Args”:[“query”, “b”]}’
210
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# echo $CORE_PEER_ADDRESS
​​​peer1.orggo.wilsoner.com:7051​​​ root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_ADDRESS=​​peer0.orgcpp.wilsoner.com:7051​​​ root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_LOCALMSPID=OrgCppMSP
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/orgcpp.wilsoner.com/users/Admin@orgcpp.wilsoner.com/msp
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/orgcpp.wilsoner.com/peers/peer0.orgcpp.wilsoner.com/tls/ca.crt
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/orgcpp.wilsoner.com/peers/peer0.orgcpp.wilsoner.com/tls/server.crt
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/orgcpp.wilsoner.com/peers/peer0.orgcpp.wilsoner.com/tls/server.key
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode query -n testcc -C testchannel -c ‘{“Args”:[“query”, “a”]}’
90
root@c6de44112a9f:/opt/gopath/src/github.com/hyperledger/fabric/peer#