为啥 fastlane 比赛让我输入密码,即使我已经输入

Posted

技术标签:

【中文标题】为啥 fastlane 比赛让我输入密码,即使我已经输入【英文标题】:why the fastlane match make me input the Passphrase even I already input为什么 fastlane 比赛让我输入密码,即使我已经输入 【发布时间】:2021-08-18 07:13:11 【问题描述】:

现在我正在使用此命令在 macOS Big Sur 中使用 fastlane match 生成分发证书:

fastlane match adhoc

我运行这个命令后,它告诉我输入Passphrase for Match storage:

[✔] ????
[15:03:31]: fastlane detected a Gemfile in the current directory
[15:03:31]: However, it seems like you didn't use `bundle exec`
[15:03:31]: To launch fastlane faster, please use
[15:03:31]:
[15:03:31]: $ bundle exec fastlane match adhoc
[15:03:31]:
[15:03:31]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[15:03:32]: In the config file './fastlane/Matchfile' you have the line git_url, but didn't provide any value. Make sure to append a value right after the option name. Make sure to check the docs for more information
[15:03:32]: In the config file './fastlane/Matchfile' you have the line username, but didn't provide any value. Make sure to append a value right after the option name. Make sure to check the docs for more information
[15:03:32]: Successfully loaded '/Users/dolphin/Documents/GitHub/flutter-netease-music/ios/fastlane/Matchfile' ????

+-----------------+---------------------------+
| Detected Values from './fastlane/Matchfile' |
+-----------------+---------------------------+
| git_branch      | master                    |
| storage_mode    | git                       |
| type            | adhoc                     |
| app_identifier  | ["com.reddwarf.musicapp"] |
+-----------------+---------------------------+


+--------------------------------+---------------------------+
|                 Summary for match 2.187.0                  |
+--------------------------------+---------------------------+
| type                           | adhoc                     |
| readonly                       | false                     |
| generate_apple_certs           | true                      |
| skip_provisioning_profiles     | false                     |
| app_identifier                 | ["com.reddwarf.musicapp"] |
| username                       | 343735881@qq.com          |
| team_id                        | 6JP4P88ZJB                |
| storage_mode                   | git                       |
| git_branch                     | master                    |
| shallow_clone                  | false                     |
| clone_branch_directly          | false                     |
| keychain_name                  | login.keychain            |
| force                          | false                     |
| force_for_new_devices          | false                     |
| skip_confirmation              | false                     |
| skip_docs                      | false                     |
| platform                       | ios                       |
| derive_catalyst_app_identifier | false                     |
| fail_on_name_taken             | false                     |
| skip_certificate_matching      | false                     |
| skip_set_partition_list        | false                     |
| verbose                        | false                     |
+--------------------------------+---------------------------+

[15:03:32]: To not be asked about this value, you can specify it using 'git_url'
[15:03:32]: URL to the git repo containing all the certificates: https://github.com/jiangxiaoqiang/music-certificate.git
[15:03:45]: Cloning remote git repo...
[15:03:45]: If cloning the repo takes too long, you can use the `clone_branch_directly` option in match.
[15:03:48]: Checking out branch master...
[15:03:48]: Enter the passphrase that should be used to encrypt/decrypt your certificates
[15:03:48]: This passphrase is specific per repository and will be stored in your local keychain
[15:03:48]: Make sure to remember the password, as you'll need it when you run match on a different machine
[15:03:48]: Passphrase for Match storage: ******
[15:03:55]: Type passphrase again: ******
[15:03:59]: wrong final block length
[15:03:59]: Couldn't decrypt the repo, please make sure you enter the right password!
keychain: "/Users/dolphin/Library/Keychains/jiangxiaoqiang-db"
version: 512
class: "inet"
attributes:
    0x00000007 <blob>="match_https://github.com/jiangxiaoqiang/music-certificate.git"
    0x00000008 <blob>=<NULL>
    "acct"<blob>=<NULL>
    "atyp"<blob>="dflt"
    "cdat"<timedate>=0x32303231303831383037303335395A00  "20210818070359Z\000"
    "crtr"<uint32>=<NULL>
    "cusi"<sint32>=<NULL>
    "desc"<blob>=<NULL>
    "icmt"<blob>=<NULL>
    "invi"<sint32>=<NULL>
    "mdat"<timedate>=0x32303231303831383037303335395A00  "20210818070359Z\000"
    "nega"<sint32>=<NULL>
    "path"<blob>=<NULL>
    "port"<uint32>=0x00000000
    "prot"<blob>=<NULL>
    "ptcl"<uint32>=0x00000000
    "scrp"<sint32>=<NULL>
    "sdmn"<blob>=<NULL>
    "srvr"<blob>="match_https://github.com/jiangxiaoqiang/music-certificate.git"
    "type"<uint32>=<NULL>
password has been deleted.
[15:03:59]: Enter the passphrase that should be used to encrypt/decrypt your certificates
[15:03:59]: This passphrase is specific per repository and will be stored in your local keychain
[15:03:59]: Make sure to remember the password, as you'll need it when you run match on a different machine
[15:03:59]: Passphrase for Match storage:

从提示中,它告诉我为匹配存储设置一个新的密码。然后显示解密失败?如何理解工作流程?我在生成开发证书的时候输入了Passphrase,所以不管是新的Passphrase还是Passphrase我输入了相同的Passphrase,为什么还是告诉我解密失败?我应该怎么做才能使解密成功?

【问题讨论】:

【参考方案1】:

它说,它缺少git_urlusername

[15:03:32]: In the config file './fastlane/Matchfile' you have the line git_url, but didn't provide any value. Make sure to append a value right after the option name. Make sure to check the docs for more information
[15:03:32]: In the config file './fastlane/Matchfile' you have the line username, but didn't provide any value. Make sure to append a value right after the option name. Make sure to check the docs for more information

您是否为fastlane match 提供了git repository

我记得我通过fastlane match appstore生成分发证书。很难让它发挥作用....


更新:

emm,我之前好像遇到过同样的问题....在我的笔记本中,我留下了以下cmets和我搜索的链接。

https://github.com/fastlane/fastlane/issues/4020

通过命令fastlane match nuke distribution,它可以清除匹配存储库中的所有内容。然后fastlane match appstore 可以重新分配一个新的密码短语密码。

脚本简介 ....

## Clean all
fastlane match nuke distribution
## Remake certifications / provisioning profiles, and a new passphrase password
fastlane match appstore

或者,

## No `match nuke distribution`. 
## Renew certifications / provisioning profiles, for TestFlight
fastlane match appstore

如果与 CI 系统(例如:Jenkins)集成,MATCH_PASSWORD 环境变量对我有很大帮助。

【讨论】:

以上是关于为啥 fastlane 比赛让我输入密码,即使我已经输入的主要内容,如果未能解决你的问题,请参考以下文章

即使我已将 geckodriver 粘贴到正确的位置,为啥还会出现 geckodriver.log 错误?

为啥 ssh 不要求时 git 要求输入密钥密码?

即使使用 API 密钥,Fastlane 上传到 App Store 也会在非交互模式下失败

为啥svn安装成功却不能下载东西,总是让输入多次用户名才、跟密码,最后提示错误了呢?

为啥ubuntu控制台输入用户名和密码后登录不进去显示login incorrect?

安装好linux系统后,提示localhost login:,我输入root后回车,弹出password:后为啥不能输入密码。