# 建立本地 CA $ mkcert -install The local CA is now installed in the system trust store! ⚡️ The local CA is now installed in the Firefox and/or Chrome/Chromium trust store (requires browser restart)! 🦊
# 建立本地 CA $ mkcert -install The local CA is now installed in the system trust store! ⚡️ The local CA is now installed in the Firefox and/or Chrome/Chromium trust store (requires browser restart)! 🦊
创建本地 https 证书
1 2 3 4 5 6 7 8 9
$ mkdir${Your local update server path} $ cd${Your local update server path} $ mkcert ${Your host name, like 'localhost'} Created a new certificate valid for the following names 📜 - "localhost"
The certificate is at "./localhost.pem" and the key at "./localhost-key.pem" ✅
# 输入密码,密码不会显示但输入都是有效的,类似 linux # 此处假设设置的 Custom sign name 为 tauri-app > tauri-app@0.0.0 tauri /home/user/Desktop/tauri-app > tauri "signer""generate""-w""/home/user/.tauri/tauri-app.key"
Generating new private key without password. Please enter a password to protect the secret key. Password: Password (one more time): Deriving a key from the password in order to encrypt the secret key... done
Your keypair was generated successfully Private: /home/user/.tauri/tauri-app.key (Keep it secret!) Public: /home/user/.tauri/tauri-app.key.pub ---------------------------
Environment variables used to sign: `TAURI_PRIVATE_KEY` Path or String of your private key `TAURI_KEY_PASSWORD` Your private key password (optional)
ATTENTION: If you lose your private key OR password, you'll not be able to sign your update package and updates will not work. ---------------------------
这里我们一共生成了三个内容,一个是我们输入的 password,需要我们记住;一个是项目的 private key tauri-app.key, 不可以泄露;一个是项目的 public key,用于校验