这是一个常见的问题,我已经寻找了相当一段时间,但没有找到解决办法。所以如果你能帮我,我很感激,因为我快疯了。也许Xcode 13是问题所在,或者是MacOS版本,我已经不知道了。
在Jenkins的归档过程中,我得到了以下错误:
** ARCHIVE FAILED **
The following build commands failed:
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler (in target 'lottie-ios' from project 'Pods')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'lottie-ios' from project 'Pods')
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler (in target 'CryptoSwift' from project 'Pods')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'CryptoSwift' from project 'Pods')
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler (in target 'Charts' from project 'Pods')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'Charts' from project 'Pods')
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler (in target 'Socket.IO-Client-Swift' from project 'Pods')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'Socket.IO-Client-Swift' from project 'Pods')
CodeSign /Users/ec2-user/Library/Developer/Xcode/DerivedData/Digital-gcckbpuniqjuffdycaxavadslfdj/Build/Intermediates.noindex/ArchiveIntermediates/Digital/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Digital-Push.appex (in target 'Digital-Push' from project 'Digital')
(9 failures)
这就是健身房的日志:
/usr/bin/codesign --force --sign DB14DD2701DF6BB1D23A6A554C4FDBA1FE9C1A56 --entitlements /Users/ec2-user/Library/Developer/Xcode/DerivedData/Digital-gcckbpuniqjuffdycaxavadslfdj/Build/Intermediates.noindex/ArchiveIntermediates/Digital/IntermediateBuildFilesPath/Digital.build/Release-iphoneos/Digital-Push.build/Digital-Push.appex.xcent --generate-entitlement-der /Users/ec2-user/Library/Developer/Xcode/DerivedData/Digital-gcckbpuniqjuffdycaxavadslfdj/Build/Intermediates.noindex/ArchiveIntermediates/Digital/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Digital-Push.appex
Warning: unable to build chain to self-signed root for signer "Apple Distribution: Banco BTG Pactual S.A. (FU2YTD6J36)"
/Users/ec2-user/Library/Developer/Xcode/DerivedData/Digital-gcckbpuniqjuffdycaxavadslfdj/Build/Intermediates.noindex/ArchiveIntermediates/Digital/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Digital-Push.appex: errSecInternalComponent
Command CodeSign failed with a nonzero exit code
在跑健身房之前,我用两种方式解锁钥匙链,直接和通过快车道:
security -v unlock-keychain -p $PASSWORD /Users/ec2-user/Library/Keychains/login.keychain
desc "Unlock keychain so jenkins can get authencation infos"
lane :keychain do
UI.success("✅✅✅ Unlock keychain so jenkins can get authencation infos ✅✅✅")
unlock_keychain(
path: "login",
password: @keychain_password
)
end
我的证书和钥匙一切都很好,如果我通过本地终端在Xcode和Fastlane中做同样的处理,那么所有的事情都会顺利进行,这就发生在Jenkins。
最后一件事情,如果它确实有一些不同,就是Jenkins工作区在用户目录之外,它在/opt/jenkins/工作区中。
发布于 2022-03-01 23:01:59
打开密钥链访问,双击正在使用的密钥,然后转到Access Control选项卡。在您的情况下,要么允许访问所有应用程序,要么只允许访问需要访问的应用程序,Jenkins。希望这能有所帮助。参考这张图片
https://stackoverflow.com/questions/70520440
复制相似问题