Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.
IaCMPlugins

PLUGIN_SKIP_MULTIPLE_NETRC

Configure PLUGIN_SKIP_MULTIPLE_NETRC to write only the primary Git credential to the netrc file.

Controls whether the IaCM plugin writes module connector credentials to the netrc file. By default, the plugin writes an entry for the primary Git credential and an entry for each module connector credential that Harness passes to the step. When you set this variable to true, the plugin skips the module connector entries and writes only the primary Git credential.

Applies to: Terraform, OpenTofu, and Terragrunt operations that run through the IaCM plugin.

Default: false.

When to use it: Use this variable if tofu init or terraform init fails with a could not read Username for 'https://github.com' error when fetching Git modules, and your workspace uses multiple Git connectors for the same host. The primary Git credential must be able to authenticate every referenced module. If modules require distinct credentials for the same host, do not enable this variable because those modules will lose access to their connector credentials through the netrc file.


Before you begin

  • Required permissions: IaCM Workspace Edit role or higher.


Configure PLUGIN_SKIP_MULTIPLE_NETRC

  1. Add the following environment variable to your IaCM workspace:

    • Key: PLUGIN_SKIP_MULTIPLE_NETRC

    • Value: true

  2. Save the workspace changes and re-run the pipeline.


Verify the configuration

Confirm that the Init step completes without the could not read Username error. If initialization still fails, check that the primary Git credential can authenticate every referenced module.


Next steps

  • Go to IaCM plugins for the full list of plugin environment variables.

  • Go to Register a module for storage type options, including Git reference and artifact storage.

Last updated

Was this helpful?