Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/105.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Jenkins/fastlane-未找到本地代码签名身份_Ios_Jenkins_Fastlane_Fastlane Match - Fatal编程技术网

Ios Jenkins/fastlane-未找到本地代码签名身份

Ios Jenkins/fastlane-未找到本地代码签名身份,ios,jenkins,fastlane,fastlane-match,Ios,Jenkins,Fastlane,Fastlane Match,我对快车道使用詹金斯有意见 在terminal works中运行此命令fastlane提供\u crashlytics\u构建测试:错误检查\u xcode:false--env xxx,但Jenkins不工作 错误消息: There are no local code signing identities found. You can run `security find-identity -v -p codesigning` to get this output. This Stack Ov

我对快车道使用詹金斯有意见

在terminal works中运行此命令
fastlane提供\u crashlytics\u构建测试:错误检查\u xcode:false--env xxx
,但Jenkins不工作

错误消息:

There are no local code signing identities found.
You can run `security find-identity -v -p codesigning` to get this output.
This Stack Overflow thread has more information: https://stackoverflow.com/q/35390072/774.
(Check in Keychain Access for an expired WWDR certificate: https://stackoverflow.com/a/35409835/774 has more info.)
[14:03:30]: No certificates for filter: Certificate ID: '7D72F7MC75' 
[14:03:30]: something bad happened: Could not find a matching code signing identity for type 'AdHoc'.
快车道2.141.0版

跟踪步骤:

  • 我运行这个命令
    security find identity-v-p codesigning
    结果如下:
    2个有效身份被找到
  • 我检查了Apple Worldwide开发者证书及其有效和可信的证书
  • 我检查了Keychain和Apple开发者帐户中的分发证书,两者都在那里
  • 下面是Jenkins Execute Shell:

    #!/bin/zsh
    export TERM=xterm-256color
    export LANG=en_US.UTF-8
    export LC_ALL=en_US.UTF-8
    
    export GIT_TRACE_PACKET=1
    export GIT_CURL_VERBOSE=1
    
    source /Users/Shared/Jenkins/.rvm/scripts/rvm
    rvm use 2.6.3
    
    fastlane provide_crashlytics_build testing:false check_xcode:false --env xxx
    
    这里是faslane巷:

    ########## Upload testbuild to crashlytics ##########
      desc "Upload testbuild to crashlytics"
      lane :provide_crashlytics_build do |options|
    
        if options[:check_xcode]
          verify_xcode
        end
    
        if options[:add_badge]
            if ENV['DARK_BADGE']
            badge(dark: true)
            else
            badge
            end
        end
    
        build_preparations
    
        if options[:testing]
          start_tests
        end
    
        pem
    
        match(
          type: "adhoc",
          app_identifier: [ENV['APP_IDENTIFIER'], ENV['APP_NOTIFICATION_EXTENSION_IDENTIFIER']],
          force_for_new_devices: true
        )
    
        gym(
          xcargs: "ARCHIVE=NO",
          output_name: "#{ENV['OUTPUT_NAME_TESTING']}"
        )
    
        verify_build(
          provisioning_type: 'distribution',
          bundle_identifier: ENV['APP_IDENTIFIER']
        )
    
        version = get_ipa_info_plist_value(ipa: "#{ENV['OUTPUT_NAME_TESTING']}.ipa", key: "CFBundleShortVersionString")
    
        crashlytics(
          api_token: ENV['CRASHLYTICS_API_TOKEN'],
          build_secret: ENV['CRASHLYTICS_BUILD_SECRET'],
          emails: ENV['CRASHLYTICS_EMAILS'],
          notifications: false,
          notes: "#{change_log_last_five_commits}"
        )
    
        if ENV['SLACK_URL']
          sh ("say 'Yippee! What a awsome day. Thanks to #{lastCommitAuthor} something great happend. A new build is born.'")  
    
          slack(
            message: "New crashlytics build of #{ENV['SCHEME']} v.#{version}(#{build})",
            channel: "#{ENV['SLACK_CHANNEL']}",
            success: true,
            use_webhook_configured_username_and_icon: true,
            default_payloads: [],
            payload: {
              'Release Notes' => change_log_last_five_commits
            }
          )
        end
    
        clean_build_artifacts
      end
    
    以下是fastlane日志:

    Summary for match 2.141.0                                              |
    +----------------------------+---------------------------------------------------------------------------------------+
    | type                       | adhoc                                                                                 |
    | app_identifier             | ["xxxxxxxxxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxx.NotificationServiceExtension"] |
    | force_for_new_devices      | true                                                                                  |
    | readonly                   | false                                                                                 |
    | generate_apple_certs       | false                                                                                 |
    | skip_provisioning_profiles | false                                                                                 |
    | username                   | xxxxxxxxxxxxxxx                                                                       |
    | team_id                    | R2Q6VXW97P                                                                            |
    | team_name                  | xxxxxxxxxxxxxxxxxxxxxxxxx                                                             |
    | storage_mode               | git                                                                                   |
    | git_url                    | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                       |
    | git_branch                 | master                                                                                |
    | shallow_clone              | false                                                                                 |
    | clone_branch_directly      | false                                                                                 |
    | keychain_name              | login.keychain                                                                        |
    | force                      | false                                                                                 |
    | skip_confirmation          | false                                                                                 |
    | skip_docs                  | false                                                                                 |
    | platform                   | ios                                                                                   |
    | verbose                    | false                                                                                 |
    +----------------------------+---------------------------------------------------------------------------------------+
    

    解决方案

  • 正如@Scriptable在评论中所说:

  • 因为Jenkins服务像守护进程一样运行,所以它无法访问登录密钥链,而是使用系统密钥链。请确保您的签名证书位于系统密钥链中,并查看这是否有助于解决您的问题

  • 证书从未设置为“始终信任”,它必须是“使用系统默认值”

  • 在解决上述问题后,我遇到了这个问题:

    caution: excluded filename not matched:  __MACOSX/*
    caution: excluded filename not matched:  *.DS_Store
    security: cert import failed: Write permissions error.
    security: problem decoding
    [10:24:35]: something bad happened: Unable to extract profile
    [10:24:35]: stacktrace: ["/Users/Shared/Jenkins/.rvm/gems/ruby-2.6.3/gems/fastlane-2.141.0/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!'", "/Users/Shared/Jenkins/.rvm/gems/ruby-2.6.3/gems/fastlane-2.141.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'" .....
    
    

    有什么建议吗?

    因为Jenkins服务像守护进程一样运行,它无法访问登录密钥链,它使用系统密钥链。请确保您的签名证书位于系统密钥链中,并查看这是否有助于解决您的问题。
    caution: excluded filename not matched:  __MACOSX/*
    caution: excluded filename not matched:  *.DS_Store
    security: cert import failed: Write permissions error.
    security: problem decoding
    [10:24:35]: something bad happened: Unable to extract profile
    [10:24:35]: stacktrace: ["/Users/Shared/Jenkins/.rvm/gems/ruby-2.6.3/gems/fastlane-2.141.0/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!'", "/Users/Shared/Jenkins/.rvm/gems/ruby-2.6.3/gems/fastlane-2.141.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'" .....