You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

CocoaPods trunk push失败求助:公开仓库无法推送库

CocoaPods Trunk推送失败问题解决

执行pod trunk push CustomUIKitItems.podspec时遇到以下错误:

Updating spec repo `trunk`
Validating podspec
 -> CustomUIKitItems (1.0.0)
    - NOTE  | xcodebuild:  note: Using codesigning identity override: -
    - NOTE  | [iOS] xcodebuild:  note: Building targets in dependency order
    - NOTE  | [iOS] xcodebuild:  note: Metadata extraction skipped. No AppIntents.framework dependency found. (in target 'CustomUIKitItems' from project 'Pods')
    - NOTE  | [iOS] xcodebuild:  note: Metadata extraction skipped. No AppIntents.framework dependency found. (in target 'App' from project 'App')

[!] Source code for your Pod was not accessible to CocoaPods Trunk. Is it a private repo or behind a username/password on http?

[!] Unable to read the license file `LICENSE` for the spec `CustomUIKitItems (1.0.0)`

[!] Unable to read the license file `LICENSE` for the spec `CustomUIKitItems (1.0.0)`

虽然仓库是公开的,但仍出现上述错误,可按以下步骤排查解决:

  • 确认版本Tag已推送至仓库:CocoaPods Trunk会拉取对应版本的Tag代码,执行以下命令确保1.0.0版本的Tag已推送到仓库:
    git tag 1.0.0
    git push origin 1.0.0
    
  • 检查LICENSE文件配置:确保仓库根目录存在LICENSE文件,且podspec中的s.license配置正确,示例:
    s.license = { :type => 'MIT', :file => 'LICENSE' }
    
    注意文件名大小写敏感,不要写成license或带后缀的格式。
  • 本地验证podspec有效性:执行pod spec lint CustomUIKitItems.podspec --verbose,查看详细的验证日志,定位具体的访问或文件读取问题。
  • 确认仓库公开权限:检查仓库可见性设置为「公开」,无分支保护或访问限制导致Trunk无法拉取代码。
  • 排查网络访问问题:若网络环境存在访问限制,尝试更换网络(如使用全局代理),确保Trunk能正常访问仓库。

内容的提问来源于stack exchange,提问作者Gonzalo MR

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.20 02:45:11