You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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:
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!
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 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.
Activity
mnardit commentedon Apr 4, 2026
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!
nandanpugalia commentedon Jun 14, 2026
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 readsTAURI_SIGNING_PRIVATE_KEY, and treats its value as either the key contents or a path if that path exists.tauri signer signsupportsTAURI_SIGNING_PRIVATE_KEY_PATHseparately.tauri signer generateprints bothTAURI_SIGNING_PRIVATE_KEYandTAURI_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:
tauri build, useTAURI_SIGNING_PRIVATE_KEY; it can be key contents or a path.TAURI_SIGNING_PRIVATE_KEY_PATHis supported bytauri signer sign.TAURI_SIGNING_PRIVATE_KEY_PASSWORDcarefully in shells/CI.Happy to open that if it matches the maintainers' intended direction.
Legend-Master commentedon Jun 15, 2026
Updating the docs is definitely welcoming! Thanks for consider contributing.
Well, the original commenter had the bug because of
shell-quoteincorrectly escaped the password, you shouldn't normally see this type of bugs...