DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk3 min

Lab 6 cryptogen Error When Adding a New Organization: Fix the YAML Mapping

A reported cryptogen YAML error was traced to a malformed Template entry. See the corrected mapping, troubleshooting checks, and version caveats.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If cryptogen extend --config=./crypto-config.yaml fails with yaml: line 85: mapping values are not allowed in this context, inspect the organization’s Template entry and its indentation. In a Linux Foundation Forums case, the author traced the error to Template: 2; the intended YAML was a nested mapping with Count: 2. That is a useful first check, not proof that every similar parser error has the same cause.

What caused the reported error?

In the December 2021 forum thread, the command failed while reading crypto-config.yaml and named line 85. The author later reported finding a typo in the organization definition: Template: 2 instead of a Template mapping containing Count: 2. The thread does not include the complete configuration file, so check the surrounding lines in your own file as well.

The corrected portion shown in the thread is:

- Name: Org2
  Domain: org2.example.com
  EnableNodeOUs: true
  Template:
    Count: 2
  Users:
    Count: 1

Here, Template introduces a nested mapping, and Count is indented beneath it. Compare that structure and indentation with the configuration template for the Fabric version you are running. The forum author said several YAML linters had accepted the file before they spotted the typo, but that single account does not establish how other linters will behave.

How should you troubleshoot the YAML parser message?

  1. Open the organization definition around the reported line. Check line 85 and nearby entries, including the organization’s Template and Users mappings.
  2. Check mapping syntax and indentation. If the configuration expects a nested Template mapping, use the structure shown above rather than assigning a scalar value such as Template: 2.
  3. Compare against the matching Fabric configuration template. Field names and command behavior can depend on the installed Fabric release; use documentation and examples for that version rather than assuming a rolling documentation page matches an older lab.
  4. Run the command again after correcting the file. The forum report used cryptogen extend --config=./crypto-config.yaml. Its command did not specify an input directory, while the current rolling command reference documents an input directory and a configuration template. Follow the syntax for your installed binaries.

The original error identifies a YAML parsing problem, but it does not by itself prove that Template is wrong in every case. If the structure is already correct, inspect other nearby mapping entries and indentation before changing unrelated configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What does cryptogen extend do—and what does it not do?

Hyperledger Fabric documents cryptogen as a utility for generating key material, provided for preconfiguring test networks; the documentation says it would normally not be used to operate a production network. Its extend command is documented for extending an existing network, with flags for an input directory and a configuration template. The command reference’s example adds a peer organization. Read the Fabric cryptogen command reference.

Generating an organization’s crypto material is not the same as adding that organization to a channel. Fabric’s channel-update tutorial treats organization definition generation and channel configuration updates as separate work. In its test-network example, the update is handled by an organization administrator; the tutorial also describes a scripted addOrg3.sh route and manual steps. See the Fabric tutorial for adding an organization to a channel.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Which version details should you verify?

The forum post dates to December 2021, while the Fabric command reference and channel-update tutorial linked here are rolling latest documentation accessed on September 28, 2026. The forum command omits an explicit input-directory flag; the current reference includes one. Do not treat those examples as interchangeable without checking the version of Fabric used by your lab.

The original thread is available at Linux Foundation Forums: “Lab6: Error with cryptogen when adding a new org”.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.