如何手动将现有的配置文件和证书添加到 fastlane 匹配?
Posted
技术标签:
【中文标题】如何手动将现有的配置文件和证书添加到 fastlane 匹配?【英文标题】:How do I manually add existing provisioning profiles and certificates to fastlane match? 【发布时间】:2016-05-01 05:41:56 【问题描述】:我在产品中有大量现有应用,我想在 fastlane match 中使用现有的配置文件和证书。
我知道 fastlane match 只能使用它首先创建的配置文件和证书,但我不愿意按照建议“核对”。
这可能吗?
我想知道我是否以匹配预期的形式手动添加到 Git 存储库中是否足够。
【问题讨论】:
【参考方案1】:启动 fastlane 2.128,您现在可以导入证书
从 fastlane 2.144 开始,您现在也可以导入配置文件了
fastlane match import \
--username email@email.com \
--git_url https://github.com/your_org/match_repo \
--app_identifier com.your.app \
--team_name "Your Team" \
--type appstore
感谢DimitarTachev'sPR!
退房
fastlane match import --help
输出:
[✔] ?
import
Usage: fastlane match import
Imports certificates and profiles into the encrypted repository
Options:
-y, --type STRING Define the profile type, can be appstore, adhoc, development, enterprise, developer_id, mac_installer_distribution (MATCH_TYPE)
--additional_cert_types ARRAY Create additional cert types needed for macOS installers (valid values: mac_installer_distribution, developer_id_installer) (MATCH_ADDITIONAL_CERT_TYPES)
--readonly [VALUE] Only fetch existing certificates and profiles, don't generate new ones (MATCH_READONLY)
--generate_apple_certs [VALUE] Create a certificate type for Xcode 11 and later (Apple Development or Apple Distribution) (MATCH_GENERATE_APPLE_CERTS)
--skip_provisioning_profiles [VALUE] Skip syncing provisioning profiles (MATCH_SKIP_PROVISIONING_PROFILES)
-a, --app_identifier ARRAY The bundle identifier(s) of your app (comma-separated string or array of strings) (MATCH_APP_IDENTIFIER)
--api_key_path STRING Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file) (SIGH_API_KEY_PATH)
--api_key STRING Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option) (SIGH_API_KEY)
-u, --username STRING Your Apple ID Username (MATCH_USERNAME)
-b, --team_id STRING The ID of your Developer Portal team if you're in multiple teams (FASTLANE_TEAM_ID)
-l, --team_name STRING The name of your Developer Portal team if you're in multiple teams (FASTLANE_TEAM_NAME)
-q, --storage_mode STRING Define where you want to store your certificates (MATCH_STORAGE_MODE)
-r, --git_url STRING URL to the git repo containing all the certificates (MATCH_GIT_URL)
--git_branch STRING Specific git branch to use (MATCH_GIT_BRANCH)
--git_full_name STRING git user full name to commit (MATCH_GIT_FULL_NAME)
--git_user_email STRING git user email to commit (MATCH_GIT_USER_EMAIL)
--shallow_clone [VALUE] Make a shallow clone of the repository (truncate the history to 1 revision) (MATCH_SHALLOW_CLONE)
--clone_branch_directly [VALUE] Clone just the branch specified, instead of the whole repo. This requires that the branch already exists. Otherwise the command will fail
(MATCH_CLONE_BRANCH_DIRECTLY)
--git_basic_authorization STRING Use a basic authorization header to access the git repo (e.g.: access via HTTPS, GitHub Actions, etc), usually a string in Base64 (MATCH_GIT_BASIC_AUTHORIZATION)
--git_bearer_authorization STRING Use a bearer authorization header to access the git repo (e.g.: access to an Azure DevOps repository), usually a string in Base64
(MATCH_GIT_BEARER_AUTHORIZATION)
--git_private_key STRING Use a private key to access the git repo (e.g.: access to GitHub repository via Deploy keys), usually a id_rsa named file or the contents hereof (MATCH_GIT_PRIVATE_KEY)
--google_cloud_bucket_name STRING Name of the Google Cloud Storage bucket to use (MATCH_GOOGLE_CLOUD_BUCKET_NAME)
--google_cloud_keys_file STRING Path to the gc_keys.json file (MATCH_GOOGLE_CLOUD_KEYS_FILE)
--google_cloud_project_id STRING ID of the Google Cloud project to use for authentication (MATCH_GOOGLE_CLOUD_PROJECT_ID)
--s3_region STRING Name of the S3 region (MATCH_S3_REGION)
--s3_access_key STRING S3 access key (MATCH_S3_ACCESS_KEY)
--s3_secret_access_key STRING S3 secret access key (MATCH_S3_SECRET_ACCESS_KEY)
--s3_bucket STRING Name of the S3 bucket (MATCH_S3_BUCKET)
--s3_object_prefix STRING Prefix to be used on all objects uploaded to S3 (MATCH_S3_OBJECT_PREFIX)
-s, --keychain_name STRING Keychain the items should be imported to (MATCH_KEYCHAIN_NAME)
-p, --keychain_password STRING This might be required the first time you access certificates on a new mac. For the login/default keychain this is your macOS account password
(MATCH_KEYCHAIN_PASSWORD)
--force [VALUE] Renew the provisioning profiles every time you run match (MATCH_FORCE)
--force_for_new_devices [VALUE] Renew the provisioning profiles if the device count on the developer portal has changed. Ignored for profile type 'appstore' (MATCH_FORCE_FOR_NEW_DEVICES)
--skip_confirmation [VALUE] Disables confirmation prompts during nuke, answering them with yes (MATCH_SKIP_CONFIRMATION)
--skip_docs [VALUE] Skip generation of a README.md for the created git repository (MATCH_SKIP_DOCS)
-o, --platform STRING Set the provisioning profile's platform to work with (i.e. ios, tvos, macos, catalyst) (MATCH_PLATFORM)
--derive_catalyst_app_identifier [VALUE] Enable this if you have the Mac Catalyst capability enabled and your project was created with Xcode 11.3 or earlier. Prepends 'maccatalyst.' to the app
identifier for the provisioning profile mapping (MATCH_DERIVE_CATALYST_APP_IDENTIFIER)
--template_name STRING The name of provisioning profile template. If the developer account has provisioning profile templates (aka: custom entitlements), the template name can be found by
inspecting the Entitlements drop-down while creating/editing a provisioning profile (e.g. "Apple Pay Pass Suppression Development") (MATCH_PROVISIONING_PROFILE_TEMPLATE_NAME)
--profile_name STRING A custom name for the provisioning profile. This will replace the default provisioning profile name if specified (MATCH_PROVISIONING_PROFILE_NAME)
--fail_on_name_taken [VALUE] Should the command fail if it was about to create a duplicate of an existing provisioning profile. It can happen due to issues on Apple Developer Portal, when profile
to be recreated was not properly deleted first (MATCH_FAIL_ON_NAME_TAKEN)
--skip_certificate_matching [VALUE] Set to true if there is no access to Apple developer portal but there are certificates, keys and profiles provided. Only works with match import action
(MATCH_SKIP_CERTIFICATE_MATCHING)
--output_path STRING Path in which to export certificates, key and profile (MATCH_OUTPUT_PATH)
-P, --skip_set_partition_list [VALUE] Skips setting the partition list (which can sometimes take a long time). Setting the partition list is usually needed to prevent Xcode from prompting to
allow a cert to be used for signing (MATCH_SKIP_SET_PARTITION_LIST)
【讨论】:
--type appstore
对我来说至关重要,因为它是我正在导入的分发证书,但不断收到错误消息,提示没有与我正在导入的证书匹配的证书..
谢谢@Ted,是否有一些在github.com/fastlane/fastlane/issues 上导入现有规定的票?
我已经为 Provisioning Profiles 和 Windows 支持打开了一个 PR - github.com/fastlane/fastlane/pull/16188【参考方案2】:
http://macoscope.com/blog/simplify-your-life-with-fastlane-match/#migration 有一本手册解释了如何手动添加配置文件和证书
编辑:Wayback Machine 链接,因为以上内容不再加载:https://web.archive.org/web/20161124141102/http://macoscope.com/blog/simplify-your-life-with-fastlane-match/
【讨论】:
如果我成功了,我会试一试并更新...谢谢。 @harshayarabarla 那个教程很好。最后,我最终使用了 nuke,主要是因为我更了解配置文件的过程和意图,并且 nuke 非常适合。以上是关于如何手动将现有的配置文件和证书添加到 fastlane 匹配?的主要内容,如果未能解决你的问题,请参考以下文章