Skip to content

[docs] updater signer environment variables inconsistency #15028

Open
tauri-apps/tauri-docs
#4193

Description

@Legend-Master

Copied from the message I posted on discord

Our doc says

export TAURI_SIGNING_PRIVATE_KEY="Path or content of your private key"

while tauri signer generate outputs

Environment variables used to sign:
- `TAURI_SIGNING_PRIVATE_KEY`: String of your private key
- `TAURI_SIGNING_PRIVATE_KEY_PATH`: Path to your private key file
- `TAURI_SIGNING_PRIVATE_KEY_PASSWORD`:  Your private key password (optional if key has no password)

The signer command uses what it says while the bundle command only uses TAURI_SIGNING_PRIVATE_KEY (try as path first and if it's not a file, use it as literal)

I don't mind either of them, we just need to be consistent about it, worst case we do both (keep both TAURI_SIGNING_PRIVATE_KEY and TAURI_SIGNING_PRIVATE_KEY_PATH and allow path or content for TAURI_SIGNING_PRIVATE_KEY)

Activity

  1. mnardit commented on Apr 4, 2026

    @mnardit

    While you are updating the documentation for the signer environment variables (specifically TAURI_SIGNING_PRIVATE_KEY_PASSWORD), I highly recommend adding a warning/note about shell escaping behavior.

    Many users run into a cryptic Wrong password for that key error because their terminal, CI pipeline, or CLI wrappers (like AI coding agents) silently escape special characters in the password. For example, if a password contains an exclamation mark (!), underlying tools like shell-quote often mutate it to ! during key generation or when exporting the env var, completely breaking the signing process downstream.

    I recently spent hours debugging this exact scenario where the environment variable was silently mutated, causing 20+ releases to fail. I wrote a detailed post-mortem about it here:

    https://max.nardit.com/articles/the-invisible-backslash

    Adding a small tip in the docs like "Warning: Ensure your password does not contain shell metacharacters that might be silently escaped by your terminal or CI environment when using TAURI_SIGNING_PRIVATE_KEY_PASSWORD" would save developers a massive amount of debugging time!

  2. nandanpugalia commented on Jun 14, 2026

    @nandanpugalia

    I dug into the current v2 docs and CLI source because I recently spent time around updater signing while shipping a Tauri updater flow.

    From what I can tell:

    • tauri build / updater artifact signing currently reads TAURI_SIGNING_PRIVATE_KEY, and treats its value as either the key contents or a path if that path exists.
    • tauri signer sign supports TAURI_SIGNING_PRIVATE_KEY_PATH separately.
    • tauri signer generate prints both TAURI_SIGNING_PRIVATE_KEY and TAURI_SIGNING_PRIVATE_KEY_PATH.

    So the updater docs do not seem exactly wrong for the build flow, but they also do not explain the difference between build-time signing and tauri signer sign, which is where the env-var behavior becomes confusing.

    Would a small docs PR clarifying the current behavior be welcome? I am thinking of a narrow note in the updater signing section and environment variables reference, without changing any documented behavior:

    • For tauri build, use TAURI_SIGNING_PRIVATE_KEY; it can be key contents or a path.
    • TAURI_SIGNING_PRIVATE_KEY_PATH is supported by tauri signer sign.
    • Quote/escape TAURI_SIGNING_PRIVATE_KEY_PASSWORD carefully in shells/CI.

    Happy to open that if it matches the maintainers' intended direction.

  3. Legend-Master commented on Jun 15, 2026

    @Legend-Master
    ContributorAuthor
    • For tauri build, use TAURI_SIGNING_PRIVATE_KEY; it can be key contents or a path.
    • TAURI_SIGNING_PRIVATE_KEY_PATH is supported by tauri signer sign.

    Updating the docs is definitely welcoming! Thanks for consider contributing.

    • Quote/escape TAURI_SIGNING_PRIVATE_KEY_PASSWORD carefully in shells/CI.

    Well, the original commenter had the bug because of shell-quote incorrectly escaped the password, you shouldn't normally see this type of bugs...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions