Jenkins:命令/usr/bin/codesign失败,退出代码为1
问题描述:
我能够使用以下命令来存档ios项目
cordova build ios --device --debug
和
cordova build ios --device --release
但是当我尝试从 jenkins
执行相同操作时,我遇到了错误.
But when i try to do same from jenkins
i am getting below error.
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
答
使用ssh(从主服务器到从服务器的连接)时,在运行命令之前,应先解锁钥匙串
You should unlock your keychain before running the command when using ssh (connection from the master to a slave)
安全性解锁钥匙串-p" $ {keychain}
security unlock-keychain -p "" ${keychain}
看看这个链接了解更多详情