Fastlane 匹配问题:无法解密存储库,请确保输入正确的密码

问题描述 投票:0回答:2

我正在尝试学习 fastlane,目前被阻止在

fastlane match
https://docs.fastlane.tools/actions/match/#fastlane

按照文档,我安装了 fastlane。

  • 我为配置文件和证书创建了一个私有存储库。
  • 我使用密码创建了 SSH 密钥,例如
    sfsfsdf
  • 我将 SSH 密钥添加到 ssh-agent 并将其上传到 GitHub。

然后我跑了

bundle exec fastlane match init
并调整了
Matchfile

匹配文件

git_url("[email protected]:my-repository/certificates.git")
git_branch("main")

type "development" # The default type, can be: appstore, adhoc, enterprise or development

app_identifier("com.mydomain.ios.project.v1")
username("[email protected]") 

然后我运行

bundle exec fastlane match development
来生成并安装开发证书和配置文件,这会生成以下输出:

fastlane could not check for updates error: 776: unexpected token at '<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchBucket</Code><Message>The specified bucket does not exist</Message><BucketName>kits-crashlytics-com</BucketName><RequestId>VX3SA</RequestId><HostId>hnZRvv3hulf/q50pxV5S1co0jPLJq0KgI6/1EB0jQEI+dWlLedQA=</HostId></Error>'
[15:53:38]: Successfully loaded '/Users/my-user/my-project/fastlane/Matchfile' 📄

+----------------+--------------------------------------+
|      Detected Values from './fastlane/Matchfile'      |
+----------------+--------------------------------------+
| git_url        | [email protected]:my-repository/
certificates.git                                    |
| git_branch     | main                                 |
| type           | development                          |
| app_identifier | com.mydomain.ios.project.v1.         |
| username       | [email protected]       |
+----------------+--------------------------------------+


+-----------------------+--------------------------------------+
|                   Summary for match 2.28.3                   |
+-----------------------+--------------------------------------+
| git_url               | [email protected]:my-repository/
certificates.git                           |
| git_branch            | main                                 |
| type                  | development                          |
| app_identifier        | com.mydomain.ios.project.v1.         |
| username              | [email protected]       |
| keychain_name         | login.keychain                       |
| readonly              | false                                |
| team_id               | TEAM_ID_NUMBER                       |
| verbose               | false                                |
| force                 | false                                |
| skip_confirmation     | false                                |
| shallow_clone         | false                                |
| force_for_new_devices | false                                |
| skip_docs             | false                                |
| platform              | ios                                  |
+-----------------------+--------------------------------------+

[15:53:38]: Cloning remote git repo...
[15:53:40]: Checking out branch main...
[15:53:40]: Enter the passphrase that should be used to encrypt/decrypt your certificates
[15:53:40]: This passphrase is specific per repository and will be stored in your local keychain
[15:53:40]: Make sure to remember the password, as you'll need it when you run match on a different machine
[15:53:40]: Passphrase for Git Repo: 

我输入了用于 SSH 密钥的密码 (

sfsfsdf
),然后看到以下错误:

[15:59:09]: Couldn't decrypt the repo, please make sure you enter the right password!
keychain: "/Users/my-user/Library/Keychains/login.keychain-db"
version: 512
class: "inet"
attributes:
    0x00000007 <blob>="[email protected]:my-repository/certificates.git"
    0x00000008 <blob>=<NULL>
    "acct"<blob>=<NULL>
    "atyp"<blob>="dflt"
    "cdat"<timedate>=0x32303232303531303232353930395A00  "20220510225909Z\000"
    "crtr"<uint32>=<NULL>
    "cusi"<sint32>=<NULL>
    "desc"<blob>=<NULL>
    "icmt"<blob>=<NULL>
    "invi"<sint32>=<NULL>
    "mdat"<timedate>=0x32303232303531303232353930395A00  "20220510225909Z\000"
    "nega"<sint32>=<NULL>
    "path"<blob>=<NULL>
    "port"<uint32>=0x00000000 
    "prot"<blob>=<NULL>
    "ptcl"<uint32>=0x00000000 
    "scrp"<sint32>=<NULL>
    "sdmn"<blob>=<NULL>
    "srvr"<blob>="[email protected]:my-repository/certificates.git"
    "type"<uint32>=<NULL>
password has been deleted.
[15:59:09]: Enter the passphrase that should be used to encrypt/decrypt your certificates
[15:59:09]: This passphrase is specific per repository and will be stored in your local keychain
[15:59:09]: Make sure to remember the password, as you'll need it when you run match on a different machine
[15:59:09]: Passphrase for Git Repo: 

我做错了什么或没做什么?

谢谢!

fastlane
2个回答
0
投票

我也面临着类似的问题。到目前为止,我见过的唯一解决方案是将存储库的密码添加到

Matchfile
作为
ENV["MATCH_PASSWORD"] = "[PASSWORD]"

这对我来说不起作用,但这是我发现的最好的,它至少使错误在命令行上更加明显。我的下一次尝试将运行

fastlane match nuke
并重新开始该过程。

此问题有关于其可重现步骤和解决方案的更多细节:https://github.com/fastlane/fastlane/issues/14879.


0
投票

我建议您将 Fastlane 更新到最新版本。您可以通过调用

fastlane --version
bundle exec fastlane --version
(如果您使用 Bundler)来检查您的 shell 版本。目前最新的是
2.220.0

如果这不能解决 Fastlane 要求您提供匹配存储库密码的问题,并且尽管输入了正确的密码,但仍无法正确解密证书和配置文件,请尝试通过调用

export MATCH_PASSWORD={passphrase}
将您的密码导出为 ENV var,然后之后
bundle exec fastlane match development

注意:将 {passphare} 替换为匹配存储库密码。

或者,如果前面提到的一切都失败了,您可以尝试通过调用

fastlane match change_password
Fastlane 匹配文档

来更改 Match 存储库密码
© www.soinside.com 2019 - 2024. All rights reserved.