【问题标题】:Can't find specified item in keychain在钥匙串中找不到指定的项目
【发布时间】:2021-10-06 08:51:36
【问题描述】:

我正在尝试学习本教程https://pilloxa.gitlab.io/posts/safer-passwords-in-gradle/。但是即使我已经在钥匙链中设置了钥匙,每当我运行这个命令时

security find-generic-password -s android_keystore -w 

我收到以下消息


security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.

我似乎无法使用该命令来查找钥匙串中存在的任何钥匙。当我尝试完全构建 apk 时,我收到一个错误,即密钥不存在。当我使用明文密码时,我设法构建了 apk,但我似乎无法让钥匙串工作

【问题讨论】:

    标签: android react-native apk


    【解决方案1】:

    确保您已将密码添加到 Default Keychains/login

    下的 Keychain

    然后尝试输入相同的命令。

    附:如果一切正常,除了构建仍然有相同的错误(密码错误),尝试更改:

    def pass = getPassword("YOUR_USER_NAME","android_keystore")
    
    def pass = getPassword("android_keystore","android_keystore")
    

    YOUR_USER_NAME - 这是您在 android_keystore 的钥匙串中声明的名称

    【讨论】:

      猜你喜欢
      • 2020-03-23
      • 1970-01-01
      • 2023-04-10
      • 2019-10-08
      • 1970-01-01
      • 2017-04-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多