> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/infrastructure-as-code-management/platform/iacm-connectors-variables/iacm-plugins/plugin-skip-multiple-netrc.md). Agents can also search and read this documentation through its [MCP server](https://developer.harness.io/~gitbook/mcp).

# 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](https://developer.harness.io/infrastructure-as-code-management/platform/iacm-connectors-variables/iacm-plugins.md) for the full list of plugin environment variables.
* Go to [Register a module](https://developer.harness.io/infrastructure-as-code-management/registry/module-registry/module-registry.md) for storage type options, including Git reference and artifact storage.

{% @harness-feedback/feedback %}
