Jenkins:命令/ usr / bin / codesign失败,退出代码为1

时间:2017-02-17 05:57:27

标签: ios xcode jenkins continuous-integration continuous-deployment

我可以使用以下命令

归档ios项目

cordova build ios --device --debug

cordova build ios --device --release

但是,当我尝试从 jenkins 做同样的事情时,我会遇到错误。

11:08:01 SecKey API returned: -25308, (null)/Users/Jenkins/Library/Developer/Xcode/DerivedData/GRC_Pulse-ebufuetkmalmfxbiegclmzuryhrm/Build/Intermediates/ArchiveIntermediates/GRC Pulse/InstallationBuildProductsLocation/Applications/GRC Pulse.app: unknown error -1=ffffffffffffffff
11:08:01 Command /usr/bin/codesign failed with exit code 1
11:08:01 
11:08:01 ** ARCHIVE FAILED **
11:08:01 
11:08:01 
11:08:01 The following build commands failed:
11:08:01    CodeSign /Users/Jenkins/Library/Developer/Xcode/DerivedData/GRC_Pulse-ebufuetkmalmfxbiegclmzuryhrm/Build/Intermediates/ArchiveIntermediates/GRC\ Pulse/InstallationBuildProductsLocation/Applications/GRC\ Pulse.app
11:08:01 (1 failure)
11:08:01 Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/Jenkins/projects/grc-pulse-hybrid-custom/platforms/ios/cordova/build-debug.xcconfig,-workspace,GRC Pulse.xcworkspace,-scheme,GRC Pulse,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,GRC Pulse.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/Jenkins/projects/grc-pulse-hybrid-custom/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/Jenkins/projects/grc-pulse-hybrid-custom/platforms/ios/build/sharedpch

3 个答案:

答案 0 :(得分:6)

在使用ssh(从主服务器到从服务器的连接)运行命令之前,您应该解锁您的钥匙串

security unlock-keychain -p“”$ {keychain}

请查看此link了解详情

答案 1 :(得分:0)

我在Xcode 8.3中遇到了这个错误:

unknown error -1=ffffffffffffffff
Command /usr/bin/codesign failed with exit code 1

** ARCHIVE FAILED **

并且

security unlock-keychain -p "mypass" ${mykeychain}

也解决了它。

答案 2 :(得分:0)

我要进行芯片处理以及我不得不尝试一些比这里提到的更多的东西:问题(对我而言)是钥匙串不像SSH会话。我必须在我的会话中执行这些来修复它:

security unlock-keychain -p MY_PASS ~/Library/Keychains/login.keychain
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k MY_PASS ~/Library/Keychains/login.keychain
security set-keychain-settings ~/Library/Keychains/login.keychain

我还从XCode中移除了我的帐户(我使用fastlane进行构建),删除了我当前的证书系统/帐户证书,但我怀疑这不会影响它。

现在这是关于这个左右的第三篇文章,但我当然希望能帮助为某人节省8小时的工作......