Skip to content

mixin conf file & env variables #3380

Description

@sysmat

CLI Version

3.6.2

Operating System and Architecture

  • macOS (arm64)
  • macOS (x86_64)
  • Linux (i686)
  • Linux (x86_64)
  • Linux (armv7)
  • Linux (aarch64)
  • Windows (i686)
  • Windows (x86_64)

Operating System Version

all OS

Link to reproduction repository

No response

CLI Command

No response

Exact Reproduction Steps

Support mixing .sentryclirc configuration with environment variables

Summary

Recent versions of sentry-cli (tested with 3.6.2) no longer appear to support mixing configuration from .sentryclirc and environment variables as previous versions did.

Expected behavior

It should be possible to store non-sensitive configuration in .sentryclirc, for example:

  • url
  • org
  • project

while providing sensitive values, such as SENTRY_AUTH_TOKEN, through environment variables.

The expected precedence would be:

  1. Command-line arguments
  2. Environment variables
  3. .sentryclirc

This allows committing only non-sensitive configuration to source control while keeping authentication tokens in CI/CD secrets or local environment variables.

Current behavior

With sentry-cli 3.6.2, configuration does not appear to be merged correctly. If part of the configuration is provided via .sentryclirc and the rest via environment variables, the CLI fails instead of combining the two sources.

Why this is useful

Many projects use the following pattern:

  • Commit .sentryclirc with shared project configuration.
  • Provide SENTRY_AUTH_TOKEN through environment variables.
  • Optionally override other settings in CI.

This avoids storing secrets in the repository while keeping the configuration simple and reusable.

Request

Please consider restoring support for merging configuration from .sentryclirc and environment variables, or clarify whether this behavior was intentionally changed. If it was an intentional change, documenting the recommended migration path would also be appreciated.

Expected Results

Support mixing .sentryclirc configuration with environment variables

Summary

Recent versions of sentry-cli (tested with 3.6.2) no longer appear to support mixing configuration from .sentryclirc and environment variables as previous versions did.

Expected behavior

It should be possible to store non-sensitive configuration in .sentryclirc, for example:

  • url
  • org
  • project

while providing sensitive values, such as SENTRY_AUTH_TOKEN, through environment variables.

The expected precedence would be:

  1. Command-line arguments
  2. Environment variables
  3. .sentryclirc

This allows committing only non-sensitive configuration to source control while keeping authentication tokens in CI/CD secrets or local environment variables.

Current behavior

With sentry-cli 3.6.2, configuration does not appear to be merged correctly. If part of the configuration is provided via .sentryclirc and the rest via environment variables, the CLI fails instead of combining the two sources.

Why this is useful

Many projects use the following pattern:

  • Commit .sentryclirc with shared project configuration.
  • Provide SENTRY_AUTH_TOKEN through environment variables.
  • Optionally override other settings in CI.

This avoids storing secrets in the repository while keeping the configuration simple and reusable.

Request

Please consider restoring support for merging configuration from .sentryclirc and environment variables, or clarify whether this behavior was intentionally changed. If it was an intentional change, documenting the recommended migration path would also be appreciated.

Actual Results

cli fail

Logs

not valid token

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIssue typeCLIProduct area

    Projects

    Status
    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions