首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在Jenkins中使用fastlane生成CodeSign错误

在Jenkins中使用fastlane生成CodeSign错误
EN

Stack Overflow用户
提问于 2021-12-29 13:58:43
回答 2查看 1.3K关注 0票数 1

这是一个常见的问题,我已经寻找了相当一段时间,但没有找到解决办法。所以如果你能帮我,我很感激,因为我快疯了。也许Xcode 13是问题所在,或者是MacOS版本,我已经不知道了。

在Jenkins的归档过程中,我得到了以下错误:

代码语言:javascript
运行
复制
    ** 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)

这就是健身房的日志:

代码语言:javascript
运行
复制
/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

在跑健身房之前,我用两种方式解锁钥匙链,直接和通过快车道:

代码语言:javascript
运行
复制
security -v unlock-keychain -p $PASSWORD /Users/ec2-user/Library/Keychains/login.keychain
代码语言:javascript
运行
复制
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/工作区中。

EN

回答 2

Stack Overflow用户

发布于 2022-03-01 23:01:59

打开密钥链访问,双击正在使用的密钥,然后转到Access Control选项卡。在您的情况下,要么允许访问所有应用程序,要么只允许访问需要访问的应用程序,Jenkins。希望这能有所帮助。参考这张图片

票数 3
EN

Stack Overflow用户

发布于 2022-01-09 23:39:42

如果其他人有此问题,我会遇到类似的错误/场景,发现服务器(我们使用与Jenkins不同的产品)请求允许“签名”存档,并且需要人工输入/登录用户的密码。我怀疑是进入了钥匙链。我们也开始解锁的钥匙链,所以我不确定为什么它仍然要求密码手动这样做。因此,修复(至少在我的场景中)是登录到服务器并尝试一个归档文件来提供所请求的密码。在这之后,我没有任何问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70520440

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档