遇到的问题
- 运行 match appstore 时遇到 openssl 库版本问题, 更新 openssl 库
AfluyFileSystem:Remote afluy$ match appstore
[19:53:01]: Successfully loaded '/Users/afluy/WorkCodeIOS/Remote/fastlane/Matchfile' 📄
....
[19:53:01]: Cloning remote git repo...
/Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.53.0/lib/fastlane_core/command_executor.rb:46: warning: Insecure world writable dir /Users/afluy/Applications/dex2jar-2.0 in PATH, mode 040777
[19:53:02]: 🔓 Successfully decrypted certificates repo
[19:53:02]: Verifying that the certificate and profile are still valid on the Dev Portal...
[19:53:20]: 🔒 Successfully encrypted certificates repo
[19:53:20]: -----------------------------------------------------------------------
[19:53:20]: Connection reset by peer - SSL_connect
[19:53:20]:
[19:53:20]: SSL errors can be caused by various components on your local machine.
[19:53:20]: Apple has recently changed their servers to require TLS 1.2, which may
[19:53:20]: not be available to your system installed Ruby (2.0.0)
[19:53:20]:
[19:53:20]: The best solution is to install a new version of Ruby
[19:53:20]:
[19:53:20]: - Make sure OpenSSL is installed with Homebrew: `brew update && brew upgrade openssl`
[19:53:20]: - If you use system Ruby:
[19:53:20]: - Run `brew update && brew install ruby`
[19:53:20]: - If you use rbenv with ruby-build:
[19:53:20]: - Run `brew update && brew upgrade ruby-build && rbenv install ruby-2.3.1`
[19:53:20]: - Run `rbenv global ruby-2.3.1` to make it the new global default Ruby version
[19:53:20]: - If you use rvm:
[19:53:20]: - First run `rvm osx-ssl-certs update all`
[19:53:20]: - Then run `rvm reinstall ruby-2.3.1 --with-openssl-dir=/usr/local
[19:53:20]:
[19:53:20]: If that doesn't fix your issue, please google for the following error message:
[19:53:20]: 'Connection reset by peer - SSL_connect'
[19:53:20]: -----------------------------------------------------------------------
[!] Connection reset by peer - SSL_connect
- 运行 match development 时遇到 Apple 账号权限问题, 请使用可以上传 profile 的账号
AfluyFileSystem:Remote afluy$ match development
[20:35:02]: Successfully loaded '/Users/afluy/WorkCodeIOS/Remote/fastlane/Matchfile' 📄
...
[20:35:02]: Cloning remote git repo...
[20:35:03]: 🔓 Successfully decrypted certificates repo
[20:35:03]: Verifying that the certificate and profile are still valid on the Dev Portal...
[20:35:17]: Couldn't find a valid code signing identity in the git repo for development... creating one for you now
...
[20:35:17]: Starting login with user 'zhao.xianhua@whaley.cn'
[20:35:22]: Successfully logged in
[20:35:25]: $ security import /var/folders/_n/kyvgh8495bv5zmmdg7f85_1r0000gn/T/d20161027-57678-otquli/certs/development/K2935G9MQS.p12 -k '/Users/afluy/Library/Keychains/login.keychain' -T /usr/bin/codesign -T /usr/bin/security
[20:35:25]: ▸ 1 key imported.
[20:35:25]: $ security import /var/folders/_n/kyvgh8495bv5zmmdg7f85_1r0000gn/T/d20161027-57678-otquli/certs/development/K2935G9MQS.cer -k '/Users/afluy/Library/Keychains/login.keychain' -T /usr/bin/codesign -T /usr/bin/security
[20:35:25]: ▸ 1 certificate imported.
[20:35:25]: Successfully generated K2935G9MQS which was imported to the local machine.
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1062 100 1062 0 0 825 0 0:00:01 0:00:01 --:--:-- 825
[20:35:28]: Verifying the certificate is properly installed locally...
[20:35:28]: Successfully installed certificate K2935G9MQS
...
[20:35:29]: Starting login with user '...'
[20:35:31]: Successfully logged in
[20:35:31]: Fetching profiles...
[20:35:31]: No existing profiles found, that match the certificates you have installed locally! Creating a new provisioning profile for you
[20:35:35]: Creating new provisioning profile for '...' with name 'match Development ...'
[20:35:38]: An error occured while verifying your certificates and profiles with the Apple Developer Portal.
[20:35:38]: If you already have your certificates stored in git, you can run `match` in readonly mode
[20:35:38]: to just install the certificates and profiles without accessing the Dev Portal.
[20:35:38]: To do so, just pass `readonly: true` to your match call.
[20:35:38]: 🔒 Successfully encrypted certificates repo
Looking for related GitHub issues on fastlane/fastlane...
Found no similar issues. To create a new issue, please visit:
https://github.com/fastlane/fastlane/issues/new
[!] Apple provided the following error info:
You are not permitted to create provisioning profiles for team. Please contact one of your team admins, who can create a profile on your behalf.
- Apple 官网和本地机器上已经有证书, 需要删除官网和本地的证书, 也可以运行上面说的 match nuke 命令来清空已有的证书
AfluyFileSystem:Remote afluy$ match development
[10:53:48]: Successfully loaded '/Users/afluy/WorkCodeIOS/Remote/fastlane/Matchfile' 📄
...
[10:53:48]: Cloning remote git repo...
[10:53:54]: 🔓 Successfully decrypted certificates repo
[10:53:54]: Verifying that the certificate and profile are still valid on the Dev Portal...
[10:54:00]: Couldn't find a valid code signing identity in the git repo for development... creating one for you now
...
[10:54:00]: Starting login with user 'zhao.xianhua@whaley.cn'
[10:54:02]: Successfully logged in
[10:54:05]: 🔒 Successfully encrypted certificates repo
Looking for related GitHub issues on fastlane/fastlane...
➡️ match: Could not create another certificate, reached the maximum number of available certificates.
https://github.com/fastlane/fastlane/issues/5765 [closed] 4 💬
17 Aug 2016
➡️ Could not create another certificate, reached the maximum number of available certificates.
https://github.com/fastlane/fastlane/issues/3472 [closed] 9 💬
5 weeks ago
➡️ Could not create another certificate, reached the maximum number of available certificates
https://github.com/fastlane/fastlane/issues/3123 [closed] 10 💬
5 weeks ago
and 10 more at: https://github.com/fastlane/fastlane/search?q=Could%20not%20create%20another%20Development%20certificate,%20reached%20the%20maximum%20number%20of%20available%20Development%20certificates.&type=Issues&utf8=✓
[!] Could not create another Development certificate, reached the maximum number of available Development certificates.
- Team 中其他开发者需要在 Xcode 中选择 Automatically manage signing
- 在 Setting up CocoaPods master repo 卡住, 这个是 CocoaPods 需要全部 clone 下来, 我最终下载了大概 700M 的文件~~
- 如果不能将改动提交到私有的存储证书的远程 git 库, 可以检查该 git 库的master分支是否被保护
参考资料
https://codesigning.guide/
https://github.com/fastlane/fastlane
https://icyleaf.com/2016/07/intro-fastlane-automation-for-ios-and-android/
https://rvm.io/rvm/install
https://ruby-china.org/wiki/rvm-guide
https://ruby-china.org/wiki/install_ruby_guide
http://macoscope.com/blog/simplify-your-life-with-fastlane-match/#main
http://stackoverflow.com/questions/36963467/how-do-i-manually-add-existing-provisioning-profiles-and-certificates-to-fastlan
http://macoscope.com/blog/simplify-your-life-with-fastlane-match/#migration
网友评论
[✔] 🚀
[✔] Looking for iOS and Android projects in current directory...
[15:58:20]: Created new folder './fastlane'.
[15:58:20]: Detected an iOS/macOS project in the current directory: 'PeiGengMath.xcworkspace'
[15:58:20]: -----------------------------
[15:58:20]: --- Welcome to fastlane 🚀 ---
[15:58:20]: -----------------------------
[15:58:20]: fastlane can help you with all kinds of automation for your mobile app
[15:58:20]: We recommend automating one task first, and then gradually automating more over time
[15:58:20]: What would you like to use fastlane for?
1. 📸 Automate screenshots
2. 👩✈️ Automate beta distribution to TestFlight
3. 🚀 Automate App Store distribution
4. 🛠 Manual setup - manually setup your project to automate your tasks
? 4
[15:58:22]: ------------------------------------------------------------
[15:58:22]: --- Setting up fastlane so you can manually configure it ---
[15:58:22]: ------------------------------------------------------------
[15:58:22]: Installing dependencies for you...
[15:58:22]: $ bundle update
到这就卡死不动了呢...
我担心切到淘宝源上 影响了我的cocopods毕竟cocopods用的更频繁
问题:Connection reset by peer - SSL_connect
An error occured during the setup process. Falling back to manual setup!
这两行错误是init后报的、然后 填写完Bundle ID后 就和你的错误一样了
Error occurred with the setup program! Reverting changes now!
[!] Connection reset by peer - SSL_connect
网上有人说 是openssl 没升级 我已经升级到最新版了 但还是没用
这个错误 你是怎么解决的呢? 麻烦你了 谢谢
请教一个问题:如果两个不同的项目,使用的是不同的开发者账号,那还可以用分支管理certificates吗?还是建两个git证书库?
在线等,谢谢!
[19:53:20]: The best solution is to install a new version of Ruby
[19:53:20]:
[19:53:20]: - Make sure OpenSSL is installed with Homebrew: `brew update && brew upgrade openssl`
[19:53:20]: - If you use system Ruby:
[19:53:20]: - Run `brew update && brew install ruby`
[19:53:20]: - If you use rbenv with ruby-build:
[19:53:20]: - Run `brew update && brew upgrade ruby-build && rbenv install ruby-2.3.1`
[19:53:20]: - Run `rbenv global ruby-2.3.1` to make it the new global default Ruby version
[19:53:20]: - If you use rvm:
[19:53:20]: - First run `rvm osx-ssl-certs update all`
[19:53:20]: - Then run `rvm reinstall ruby-2.3.1 --with-openssl-dir=/usr/local