Skip to content

[bug] Setting empty TAURI_KEY_PASSWORD still causes an interactive password prompt on Windows #6089

@kornelski

Description

@kornelski

Describe the bug

I have a tauri updater key with an empty passphrase. I want to automate builds (and very much not deal with passwords), but it doesn't seem to be possible to disable the password prompt. Specifically, it doesn't seem to be possible to set TAURI_KEY_PASSWORD to an empty string.

I've tried:

set TAURI_KEY_PASSWORD=
set TAURI_KEY_PASSWORD=""
set /p TAURI_KEY_PASSWORD < zerobytefile

These either cause the prompt to still appear or result in an invalid password to be set (like literal two quote characters).


The password prompt is disastrous for my setup, because I'm using SSH to build the tauri app on a remote Windows 10 machine. I can't press Enter there. The ssh connection hangs forever if there is a password prompt, even if I make SSH close stdin:

ssh </dev/null pc 'cd theappdir & set TAURI_PRIVATE_KEY=tauri-update.key & set /p TAURI_KEY_PASSWORD= < zerobytefile & del /q /s target\release\bundle\msi\*.* & cargo tauri build' 

It doesn't seem to be possible to fill it in the prompt remotely from a script. I've also tried printf "\r\n" | ssh …. It's probably an incompatibility with ssh. I'm using Microsoft's SSH server that ships with Windows 10, and I'm shocked that it works at all with the archaic cmd.exe.


Reproduction

set TAURI_KEY_PASSWORD=
set TAURI_PRIVATE_KEY=tauri-update.key
cargo tauri build

Expected behavior

It would be useful if cargo tauri build could support TAURI_KEY_PASSWORD set to an empty string, or try an empty passphrase before prompting, or skip the password prompt entirely when invoked via SSH if possible.

Platform and versions

Environment
› OS: Windows 10.0.19044 X64
› Webview2: 109.0.1518.52
› MSVC:
- Visual Studio Community 2019
› Node.js: Not installed!
› npm: Not installed!
› pnpm: Not installed!
› yarn: Not installed!
› rustup: 1.25.1
› rustc: 1.66.1
› cargo: 1.66.1
› Rust toolchain: stable-x86_64-pc-windows-msvc

App
› build-type: bundle
› CSP: unset
› distDir: html
› devPath: html

Stack trace

No response

Additional context

No response

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