3

I would like to generate end2end crypto-config artifacts. I need to execute following command :

build/bin/cryptogen generate --config crypto-config.yaml --output=crypto-config

Kindly let me know where i can find cryptogen tool.

Artem Barger
  • 40,769
  • 9
  • 59
  • 81
deepak parmar
  • 691
  • 1
  • 6
  • 20
  • 1
    Possible duplicate of [steps to install cryptogen tool for hyperledger fabric node setup?](https://stackoverflow.com/questions/45498921/steps-to-install-cryptogen-tool-for-hyperledger-fabric-node-setup) – Artem Barger Aug 08 '17 at 10:37

6 Answers6

5

On the Fabric Getting Started page you will see a link to Download Platform-specific binaries including cryptogen.

If you have cloned the source code, then from the /fabric directory you can

make cryptogen

and find it at /fabric/build/bin/cryptogen.

Dave Enyeart
  • 2,523
  • 14
  • 23
  • ./bin/cryptogen generate --config=./crypto-config.yaml org1.example.com org2.example.com sleep $SLEEP_TIMEOUT KEYSTORE=`ls ./crypto-config/peerOrganizations/$ORG_DOMAIN/users/Admin@$ORG_DOMAIN/msp/keystore` ls ./crypto-config/peerOrganizations/$ORG_DOMAIN/users/Admin@$ORG_DOMAIN/msp/keystore composer identity import \ -p hlfv1 \ -u Admin@$ORG_DOMAIN \ -c ./crypto-config/peerOrganizations/$ORG_DOMAIN/users/Admin@$ORG_DOMAIN/msp/signcerts/Admin@$ORG_DOMAIN-cert.pem \ -k ./crypto-config/peerOrganizations/$ORG_DOMAIN/users/Admin@$ORG_DOMAIN/msp/keystore/$KEYSTORE – Ashish Karpe Jun 07 '18 at 12:27
  • module.js:549 throw err; ^ Error: Cannot find module './api' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object. (/usr/lib/node_modules/composer-cli/node_modules/node-report/index.js:3:13) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) – Ashish Karpe Jun 07 '18 at 12:27
  • I am very new to this so please guide me – Ashish Karpe Jun 07 '18 at 12:27
1

Sorry, I cannot comment because I haven't posted enough here, but as user324781's answer no longer works:

curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/release-1.1/scripts/bootstrap.sh | bash

The issue was just that the link is out of date, so if this crops up again, just go on their repo and find scripts/bootstrap.sh file.

[Update]

The above may or may not have contributed to the solution, but either way it didn't seem to do anything on my machine.

First I made sure that my fabric-samples folder was up to date, I'm unsure if this helped but here if anyone is trying to copy. I followed the steps here:

cd ~/Build-Multi-Host-Network-Hyperledger/
git clone -b master https://github.com/hyperledger/fabric-samples.git
cd fabric-samples
git checkout master

then running (replacing ubuntu with your username):

cd ~/Build-Multi-Host-Network-Hyperledger/
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s 1.1.0
export PATH=/home/ubuntu/Build-Multi-Host-Network-Hyperledger/bin:$PATH

Based on this, and how the problem was solved, probably run the updated version of user's script, and add that dir to the path.

Hopefully, this can help someone.

Community
  • 1
  • 1
Ben Hayward
  • 191
  • 3
  • 15
1

I did the following steps to install cryptogen as is in same sequence -

mkdir -p $GOPATH/src/github.com/hyperledger
cd $GOPATH/src/github.com/hyperledger
git clone https://github.com/hyperledger/fabric/
cd fabric
make cryptogen
make docker
PATH=$PATH:$GOPATH/src/github.com/hyperledger/fabric/build/bin
0

For Linux users: The installation process of binaries tools for Hyperledger Fabric is captured in the download platform-specific binaries section.

You need to run:

curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/release-1.1/scripts/bootstrap.sh | bash

It will download required files. Make sure you have all prerequisite installed and configured as well.

For MacOSX users: You can also use Homebrew to install the Hyperledger Fabric binaries:

brew tap hyperledger/fabric
brew install fabric-tools
Richard
  • 2,080
  • 18
  • 17
  • $ curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/release/scripts/bootstrap-1.0.0.sh | bash bash: line 1: 404:: command not found – Ashish Karpe Jun 07 '18 at 10:45
  • 1
    Quote from a low rep user (Ben Hayward): *"Sorry, I cannot comment because I haven't posted enough here, but as user324781's answer no longer works. The issue was just that the link is out of date, so if this crops up again, just go on their repo and find scripts/bootstrap.sh file."* – klutt Jun 26 '18 at 12:44
0

This worked for me. Hope it helps

export PATH=${PWD}/../bin:${PWD}:$PATH export FABRIC_CFG_PATH=${PWD} export VERBOSE=false

0

I got the same error, but after adding cyptogen tool folder to path variable this issue resolved.

export PATH=$PATH:/workspace/relianceSupplyChain/bin

iminiki
  • 2,549
  • 12
  • 35
  • 45