## 1. 释义
为指定的configtx更新文件原地签名。需要`-f`标志。
## 2. 使用方法
```
~$ peer channel signconfigtx [flags]
```
## 3. 命令标志
```
-f, --file string Configuration transaction file generated by a tool such as configtxgen for submitting to orderer
-h, --help help for signconfigtx
```
全局标志:
```
--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)
--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
```
## 4. 示例代码
下面的示例签名文件`./updatechannel.txn`中定义的通道更新交易。示例列出了在签名前后的配置交易 文件:
```
~$ ls -l
-rw-r--r-- 1 anthonyodowd staff 284 25 Feb 18:16 updatechannel.tx
~$ peer channel signconfigtx -f updatechannel.tx
2018-02-25 18:16:44.456 GMT [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-02-25 18:16:44.459 GMT [main] main -> INFO 002 Exiting.....
~$ ls -l
-rw-r--r-- 1 anthonyodowd staff 2180 25 Feb 18:16 updatechannel.tx
```
可以看到节点已经成功地完成了配置交易的签名,文件updatechannel.tx的大小在签名前后有了明显变化, 从284字节变成了2180字节。
- Fabric命令手册
- Peer命令
- peer
- peer node
- peer node start
- peer node status
- peer channel
- peer channel create
- peer channel fetch
- peer channel getinfo
- peer channel join
- peer channel list
- peer channel signconfigtx
- peer channel update
- peer chaincode
- peer chaincode install
- peer chaincode instantiate
- peer chaincode invoke
- peer chaincode list
- peer chaincode package
- peer chaincode query
- peer chaincode signpackage
- peer chaincode upgrade
- peer version
- peer logging
- peer logging getlevel
- peer logging revertlevels
- peer logging setlevel
- Configtxgen命令
- configtxgen
- Configtxlator命令
- configtxlator
- configtxlator start
- configtxlator proto_encode
- configtxlator proto_decode
- configtxlator compute_update
- configtxlator version
- Cryptogen命令
- cryptogen
- cryptogen help
- cryptogen generate
- cryptogen showtemplate
- FabricCA命令
- fabric-ca-client
- fabric-ca-server