密钥库更改密码

发布于 2024-09-02 08:26:25 字数 155 浏览 5 评论 0原文

我目前有一个密钥库,其中有一个只有我应该知道的特定密码。我现在需要向其他人授予对该密钥库的访问权限,因此我想:

1)更改密码,以便我可以与其他人共享并让他们签名
2) 创建一个不同的密码并允许他们使用它进行签名。

这可能吗?以及 - 如果是 - 怎么办?

I currently have a keystore, with a particular password that only I should know. I now need to give access to that keystore to someone else, so I would like to either:

1) Change the password, so I can share it with others and let them sign
2) Create a different password and allow them to sign with it.

Is this possible? and - if yes - how?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

天涯离梦残月幽梦 2024-09-09 08:26:25

密钥库只有一个密码。您可以使用 keytool 更改它:

keytool -storepasswd -keystore my.keystore

要更改密钥的密码:

keytool -keypasswd  -alias <key_name> -keystore my.keystore

Keystore only has one password. You can change it using keytool:

keytool -storepasswd -keystore my.keystore

To change the key's password:

keytool -keypasswd  -alias <key_name> -keystore my.keystore
金橙橙 2024-09-09 08:26:25

[如何]更改密码,以便我可以与其他人共享并让他们签名

使用 keytool:

keytool -storepasswd -keystore /path/to/keystore
Enter keystore password:  changeit
New keystore password:  new-password
Re-enter new keystore password:  new-password

[How can I] Change the password, so I can share it with others and let them sign

Using keytool:

keytool -storepasswd -keystore /path/to/keystore
Enter keystore password:  changeit
New keystore password:  new-password
Re-enter new keystore password:  new-password
—━☆沉默づ 2024-09-09 08:26:25

更改密钥库密码

$ keytool -storepasswd -keystore keystorename
Enter keystore password:  <old password>
New keystore password: <new password>
Re-enter new keystore password: <new password>

更改密钥库别名密码

$ keytool -keypasswd -keystore keystorename -alias aliasname
Enter keystore password:  
New key password for <aliasname>: 
Re-enter new key password for <aliasname>:

注意:

  • keystorenam:密钥库的名称(如果您位于不同的文件夹中,则带有路径)
  • aliasname:创建时使用的别名(如果名称有空格可以使用\)

例如:

$ keytool -keypasswd -keystore keystorename -alias stop\ watch

Changing keystore password

$ keytool -storepasswd -keystore keystorename
Enter keystore password:  <old password>
New keystore password: <new password>
Re-enter new keystore password: <new password>

Changing keystore alias password

$ keytool -keypasswd -keystore keystorename -alias aliasname
Enter keystore password:  
New key password for <aliasname>: 
Re-enter new key password for <aliasname>:

Note:

  • keystorenam: name of your keystore (with path if you are in different folder)
  • aliasname: alias name you used when creating (if name has space you can use \)

For example:

$ keytool -keypasswd -keystore keystorename -alias stop\ watch
断桥再见 2024-09-09 08:26:25

要更改密钥库 mykeyfile 内密钥 myalias 的密码:

keytool -keystore mykeyfile -keypasswd -alias myalias

To change the password for a key myalias inside of the keystore mykeyfile:

keytool -keystore mykeyfile -keypasswd -alias myalias
看轻我的陪伴 2024-09-09 08:26:25

对于完整的编程更改(例如安装程序)并且没有提示

#!/bin/bash -eu

NEWPASSWORD=${1}
OLDPASSWORD=${2}

keytool -storepasswd -new "${NEWPASSWORD}" \
  -storepass "${OLDPASSWORD}" \
  -keystore /path/to/keystore

完全披露:我不建议在 shell 中运行此命令行,因为旧密码和新密码将保存在 shell 的历史记录中,并在控制台中可见。

For a full programmatic change (e.g. install program) and no prompting

#!/bin/bash -eu

NEWPASSWORD=${1}
OLDPASSWORD=${2}

keytool -storepasswd -new "${NEWPASSWORD}" \
  -storepass "${OLDPASSWORD}" \
  -keystore /path/to/keystore

Full disclosure: I DO NOT recommend running this command line in a shell, as the old and new passwords will be saved in the shell's history, and visible in console.

渔村楼浪 2024-09-09 08:26:25

KeyStore Explorer 是 Java 命令行实用程序 keytool 和 jarsigner 的开源 GUI 替代品。 KeyStore Explorer 通过直观的图形用户界面展示其功能以及更多功能。

  1. 打开现有的KeyStore
  2. Tools ->设置密钥库密码

KeyStore Explorer is an open source GUI replacement for the Java command-line utilities keytool and jarsigner. KeyStore Explorer presents their functionality, and more, via an intuitive graphical user interface.

  1. Open an existing KeyStore
  2. Tools -> Set KeyStore password
多彩岁月 2024-09-09 08:26:25

如果密钥库包含具有不同密码的其他密钥条目,您也必须更改它们,或者您可以使用以下命令将密钥隔离到不同的密钥库,

keytool -importkeystore  -srckeystore mystore.jck -destkeystore myotherstore.jks -srcstoretype jceks
-deststoretype jks -srcstorepass mystorepass -deststorepass myotherstorepass -srcalias myserverkey
-destalias myotherserverkey -srckeypass mykeypass -destkeypass myotherkeypass

If the keystore contains other key-entries with different password you have to change them also or you can isolate your key to different keystore using below command,

keytool -importkeystore  -srckeystore mystore.jck -destkeystore myotherstore.jks -srcstoretype jceks
-deststoretype jks -srcstorepass mystorepass -deststorepass myotherstorepass -srcalias myserverkey
-destalias myotherserverkey -srckeypass mykeypass -destkeypass myotherkeypass
怂人 2024-09-09 08:26:25

这里有很多答案,但如果您尝试在 Android Studio 中更改 Mac 上的 jks 密码。以下是我能找到的最简单的步骤

1) 打开终端并 cd 到您的 .jks 所在的位置

2) keytool -storepasswd -new NEWPASSWORD -keystore YOURKEYSTORE.jks

3) 输入您当前的密码

There are so many answers here, but if you're trying to change the jks password on a Mac in Android Studio. Here are the easiest steps I could find

1) Open Terminal and cd to where your .jks is located

2) keytool -storepasswd -new NEWPASSWORD -keystore YOURKEYSTORE.jks

3) enter your current password

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文