我正在尝试通过jenkins构建应用程序,但这是它崩溃的行:
[ios] $ /usr/bin/security list-keychains -s /Users/admin/Library/Keychains/login.keychain
[ios] $ /usr/bin/security default-keychain -d user -s /Users/admin/Library/Keychains/login.keychain
Will not set default: file /Users/admin/Library/Keychains/login.keychain does not exist
security: SecKeychainSetDomainDefault user: write permissions error
[ios] $ /usr/bin/security unlock-keychain -p ******** /Users/admin/Library/Keychains/login.keychain
security: SecKeychainUnlock /Users/admin/Library/Keychains/login.keychain: write permissions error
FATAL: Unable to unlock the keychain.
奇怪的是它显示该文件不存在 - 可能是因为文件的权限,但我在Keychain管理器中解锁了这个钥匙串。
当我将路径更改为login.keychain(导入后)时:
Cleaning build directory: /Users/Shared/Jenkins/Home/workspace/iOS-build/platforms/ios/build/Debug-iphoneos
[ios] $ /usr/bin/security list-keychains -s /Users/Shared/Jenkins/Home/Library/Keychains/login.keychain
[ios] $ /usr/bin/security default-keychain -d user -s /Users/Shared/Jenkins/Home/Library/Keychains/login.keychain
[ios] $ /usr/bin/security unlock-keychain -p ******** /Users/Shared/Jenkins/Home/Library/Keychains/login.keychain
[ios] $ /usr/bin/security show-keychain-info /Users/Shared/Jenkins/Home/Library/Keychains/login.keychain
Keychain "/Users/Shared/Jenkins/Home/Library/Keychains/login.keychain" no-timeout
===========================================================
== Available provisioning profiles
[ios] $ /usr/bin/security find-identity -p codesigning -v
0 valid identities found
它以此错误结束:
Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “xxxx”, however, no such provisioning profile was found.
当然在Xcode下一切正常......