Xcode 7 机器人吊舱安装

Posted

技术标签:

【中文标题】Xcode 7 机器人吊舱安装【英文标题】:Xcode 7 Bot pod install 【发布时间】:2015-09-25 00:37:30 【问题描述】:

尝试使用 bot 安装 pod 时出现错误。 有人可以解释一下问题是什么吗? 我在Setting up Xcode 6 and Apple Server 4.0 for Continuous Integration with Cocoapods 上检查了这个解决方案

集成脚本之前:

export LANG=en_US.UTF-8 cd ./CIT pwd pod install --verbose

错误:

/Library/Developer/XcodeServer/Integrations/Caches/27e5cbb07ffa7d7771a63d27e6002e1e/Source/CIT 准备中

更新本地规范存储库


Updating spec repo `master`
  $ /Applications/Xcode.app/Contents/Developer/usr/bin/git pull --ff-only
  Updating dc43eae..957650b

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods`: (``)

Finding Podfile changes
  - AFNetworking

Resolving dependencies of `Podfile`
[!] Unable to satisfy the following requirements:

- `AFNetworking` required by `Podfile`
- `AFNetworking (= 2.6.0)` required by `Podfile.lock`

/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/resolver.rb:388:in `handle_resolver_error'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/resolver.rb:69:in `rescue in resolve'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/resolver.rb:56:in `resolve'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:535:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:59:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:533:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:70:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:210:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:133:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:59:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:132:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:104:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:101:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command.rb:48:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/bin/pod:44:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
  error: Your local changes to the following files would be overwritten by merge:
    CocoaPods-version.yml
    Specs/ASStarRatingView/0.1.0/ASStarRatingView.podspec.json
    Specs/AppNexusOASSDK/1.0.0/AppNexusOASSDK.podspec.json
    Specs/CrashlyticsFramework/2.1.6/CrashlyticsFramework.podspec.json
    Specs/CrashlyticsFramework/2.1.7/CrashlyticsFramework.podspec.json
    Specs/CrashlyticsFramework/2.1.9/CrashlyticsFramework.podspec.json
    Specs/CrashlyticsFramework/2.2.0/CrashlyticsFramework.podspec.json
    Specs/CrashlyticsFramework/2.2.1/CrashlyticsFramework.podspec.json
    Specs/CrashlyticsFramework/2.2.10/CrashlyticsFramework.podspec.json
    Specs/CrashlyticsFramework/2.2.2/CrashlyticsFramework.podspec.json
    Specs/CrashlyticsFramework/2.2.3/CrashlyticsFramework.podspec.json
    Specs/CrashlyticsFramework/2.2.4/CrashlyticsFramework.podspec.json
    Specs/CrashlyticsFramework/2.2.5.1/CrashlyticsFramework.podspec.json
    Specs/CrashlyticsFramework/2.2.5.2/CrashlyticsFramework.podspec.json
    Specs/CrashlyticsFramework/2.2.5/CrashlyticsFramework.podspec.json
    Specs/CrashlyticsFramework/2.2.9/CrashlyticsFramework.podspec.json
    Specs/FlurrySDK/3.0.9/FlurrySDK.podspec.json
    Specs/FlurrySDK/4.0.1/FlurrySDK.podspec.json
    Specs/FlurrySDK/4.0.4/FlurrySDK.podspec.json
    Specs/FlurrySDK/4.0.5/FlurrySDK.podspec.json
    Specs/FlurrySDK/4.1.0/FlurrySDK.podspec.json
    Specs/FlurrySDK/4.2.1/FlurrySDK.podspec.json
    Specs/FlurrySDK/4.2.2/FlurrySDK.podspec.json
    Specs/FlurrySDK/4.2.3/FlurrySDK.podspec.json
    Specs/FlurrySDK/4.2.4/FlurrySDK.podspec.json
    Specs/FlurrySDK/4.3.0/FlurrySDK.podspec.json
    Specs/FlurrySDK/4.3.1/FlurrySDK.podspec.json
    Specs/FlurrySDK/4.3.2/FlurrySDK.podspec.json
    Specs/FlurrySDK/4.4.0/FlurrySDK.podspec.json
    Specs/FlurrySDK/5.0.0/FlurrySDK.podspec.json
    Specs/FlurrySDK/5.1.0/FlurrySDK.podspec.json
    Specs/FlurrySDK/5.2.0/FlurrySDK.podspec.json
    Specs/FlurrySDK/5.3.0/FlurrySDK.podspec.json
    Specs/FlurrySDK/5.4.0/FlurrySDK.podspec.json
    Specs/FlurrySDK/6.0.0/FlurrySDK.podspec.json
    Specs/FlurrySDK/6.2.0/FlurrySDK.podspec.json
    Specs/FlurrySDK/6.4.0/FlurrySDK.podspec.json
    Specs/FlurrySDK/6.5.0/FlurrySDK.podspec.json
    Specs/Google-Maps-ios-SDK/1.9.2/Google-Maps-iOS-SDK.podspec.json
    Specs/LibComponentLogging-pods/0.0.1/LibComponentLogging-pods.podspec.json
    Specs/LibComponentLogging-pods/0.0.2/LibComponentLogging-pods.podspec.json
    Specs/Moya/0.6.1/Moya.podspec.json
    Specs/Moya/0.6/Moya.podspec.json
    Specs/Moya/0.7.0/Moya.podspec.json
    Specs/Moya/0.7.1/Moya.podspec.json
    Specs/Moya/0.8.0/Moya.podspec.json
    Specs/Moya/1.0.0/Moya.podspec.json
    Specs/Moya/1.1.0/Moya.podspec.json
    Specs/Moya/1.1.1/Moya.podspec.json
    Specs/OpenCV/2.4.10/OpenCV.podspec.json
    Specs/OpenCV/2.4.9/OpenCV.podspec.json
    Specs/PromiseKit/1.5.3/PromiseKit.podspec.json
    Specs/RxSwift/0.7.1/RxSwift.podspec.json
    Specs/RxSwift/0.7/RxSwift.podspec.json
    Specs/RxSwift/0.8/RxSwift.podspec.json
    Specs/RxSwift/0.9/RxSwift.podspec.json
    Specs/RxSwift/1.0/RxSwift.podspec.json
    Specs/RxSwift/1.1/RxSwift.podspec.json
    Specs/RxSwift/1.2.1/RxSwift.podspec.json
    Specs/RxSwift/1.2/RxSwift.podspec.json
    Specs/RxSwift/1.3/RxSwift.podspec.json
    Specs/RxSwift/1.4/RxSwift.podspec.json
    Specs/RxSwift/1.5/RxSwift.podspec.json
    Specs/RxSwift/1.6/RxSwift.podspec.json
    Specs/TSMessages/0.9.10/TSMessages.podspec.json
    Specs/TSMessages/0.9.11/TSMessages.podspec.json
    Specs/TSMessages/0.9.12/TSMessages.podspec.json
    Specs/TSMessages/0.9.4/TSMessages.podspec.json
    Specs/TSMessages/0.9.5/TSMessages.podspec.json
    Specs/TSMessages/0.9.6/TSMessages.podspec.json
    Specs/TSMessages/0.9.7/TSMessages.podspec.json
    Specs/TSMessages/0.9.8/TSMessages.podspec.json
    Specs/TSMessages/0.9.9/TSMessages.podspec.json
    Specs/UIView+Wiggle/1.0.0/UIView+Wiggle.podspec.json
    Specs/UIView+Wiggle/1.0.1/UIView+Wiggle.podspec.json
    Specs/UIView+Wiggle/1.0.2/UIView+Wiggle.podspec.json
    Specs/toxcore-ios/0.1.0/toxcore-ios.podspec.json
    Specs/toxcore-ios/0.1.1/toxcore-ios.podspec.json
    Specs/toxcore-ios/0.1.2/toxcore-ios.podspec.json
    Specs/toxcore-ios/0.1.3/toxcore-ios.podspec.json
    Specs/toxcore-ios/0.1.4/toxcore-ios.podspec.json
    Specs/toxcore-ios
  Aborting

[!] CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`

【问题讨论】:

升级到 Xcode 7 / OS X Server 5 后遇到同样的问题。在 Xcode 6.4 中运行良好。 【参考方案1】:

我需要在我的 XcodeServer 上重置用户 _xcsbuildd 使用的 Cocoapods 存储库,以解决上述问题。我是这样做的:

1) 在您的 OS X 服务器(运行 XcodeServer)上,从服务器窗口中选择“Users”,然后右键单击“_xcsbuildd”并选择“高级选项...'。将 'Login shell' 从 '/bin/false' 更改为 '/bin/bash'。 (这将允许您从终端窗口以用户 '_xcsbuildd' 的身份登录。)

2) 从 OS X Server 上的终端窗口,以任何用户身份登录。然后,要以“_xcsbuildd”身份登录,请使用 sudo su - _xcsbuildd

3) 使用 rm -rf ~/.cocoapods 删除用户 _xcsbuildd 的 Cocoapods 存储库。

4) 最后,从您的 Xcode 开发客户端集成您的 BOT,这将在集成触发步骤之前重建 Cocoapods 存储库。

(我的客户端环境是 OS X 10.11 和 Xcode 7.0.1,而我的服务器环境是 OS X 10.11、OS X Server 5.0.4 和 Xcode 7.0.1。Cocoapods 版本是 0.38.2)

以下参考资料对我有帮助:http://honzadvorsky.com/articles/2015-08-17-17-30-xcode_server_tutorials_3_prebuild__postbuild_scripts/。

【讨论】:

以上是关于Xcode 7 机器人吊舱安装的主要内容,如果未能解决你的问题,请参考以下文章

Swift 3.0 xCode 8 迁移吊舱

Xcode 服务器机器人错误“触发器以非零状态 2 退出”

尝试将机器人添加到 xcode 服务器时出错:“此服务器无法为任何平台构建”

Xcode 6 远程集成

没有 SSL 证书就无法构建 Xcode 机器人

如何在 Xcode 7 中一次删除多个集成?