Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kornelski opened this issue Jan 18, 2023 · 0 comments
Labels
platform: Windows status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@kornelski
Copy link
Contributor

kornelski commented Jan 18, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Windows status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants