I've been trying to setup OS X Server and Xcode bots to do some CI for my projects but I've been running into no end of trouble with getting Cocoapods to play nicely.
Setup:
I have one main project that has about 30 pods. Most of them are 3rd party libraries (ReactiveCocoa, AFNetworking, etc) but 3 of them are pods that I made. One of the three is public (https://github.com/busycm/BZYStrokeTimer) and the other two are private. Of the two private pods, my project only includes one of them (we'll call this Pod A) and the other (Pod B) is a dependency in the podspec of Pod A. Both live in the same private repo on my machine which is in turn hosted in a private repo on Github.
I've been following this guide from the venerable @czechboy0 and I've been able to replicate most if not all of the steps. I gave _xcsbuildd new ssh keys which I then added to Github and was able to verify that they worked correctly, both by cloning my project and running ssh -vT git@github.com (this ran successfully both on my user and _xcsbuildd).
I then setup a bot with the following pre-integration run script:
export LANG=en_US.UTF-8
export PATH="/usr/local/bin:$PATH"
cd "$XCS_SOURCE_DIR/myproject"
if [ -e "Pods" ]
then
pod update --verbose
else
pod install --verbose
fi
Then when I run the integration, it always errors out on the run script with the following output:
(TL;DR, skip to bottom for summary)
Update all pods
Preparing
Updating local specs repositories
Updating spec repo `master-1`
$ /usr/local/bin/git pull --ff-only
Updating c909018..d84a7e5
Fast-forward
.../0.2.2/GitHubOAuthController.podspec.json | 23 ++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 Specs/GitHubOAuthController/0.2.2/GitHubOAuthController.podspec.json
CocoaPods 0.39.0.beta.4 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Updating spec repo `busycm`
$ /usr/local/bin/git pull --ff-only
Already up-to-date.
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods`: (``)
Resolving dependencies of `Podfile`
Comparing resolved specification to the sandbox manifest
A AFNetworking
A Archimedes
A BZYBinders
A BZYForm
A BZYStrokeTimer
A Bolts
A Braintree
A Cent
A Crashlytics
A Digits
A Dollar
A FBSDKCoreKit
A FBSDKLoginKit
A Fabric
A GPUImage
A IBActionSheet
A JWTDecode
A Lockbox
A MTLManagedObjectAdapter
A MYSForms
A Mantle
A ObjectiveSugar
A Overcoat
A Parse
A RNCryptor
A ReactiveCocoa
A ReactiveCocoaLayout
A ReactiveViewModel
A Realm
A RealmSwift
A SDWebImage
A SVProgressHUD
A SWRevealViewController
A SupportKit
A TTTAttributedLabel
A TransformerKit
A TwitterCore
A XYDoughnutChart
A YIInnerShadowView
Downloading dependencies
-> Installing AFNetworking (2.6.0)
> Copying AFNetworking from `/var/_xcsbuildd/Library/Caches/CocoaPods/Pods/Release/AFNetworking/2.6.0-79f7e` to `Pods/AFNetworking`
-> Installing Archimedes (1.1)
> Copying Archimedes from `/var/_xcsbuildd/Library/Caches/CocoaPods/Pods/Release/Archimedes/1.1-a181c` to `Pods/Archimedes`
-> Installing BZYBinders (0.5.4)
> Git download
> Git download
$ /usr/local/bin/git clone https://github.com/busycm/BZYBinders.git /var/folders/82/xnzs001n09dccsqt27tn7lsw000087/T/d20151001-65980-h1swsx --single-branch --depth 1 --branch 0.5.4
[!] Error installing BZYBinders
[!] /usr/local/bin/git clone https://github.com/busycm/BZYBinders.git /var/folders/82/xnzs001n09dccsqt27tn7lsw000087/T/d20151001-65980-h1swsx --single-branch --depth 1 --branch 0.5.4
Cloning into '/var/folders/82/xnzs001n09dccsqt27tn7lsw000087/T/d20151001-65980-h1swsx'...
fatal: could not read Username for 'https://github.com': Device not configured
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader.rb:130:in `rescue in execute_command'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader.rb:128:in `execute_command'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-downloader-0.9.3/lib/cocoapods-downloader/base.rb:152:in `block in executable'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-downloader-0.9.3/lib/cocoapods-downloader/git.rb:63:in `block in clone'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader.rb:161:in `block in ui_sub_action'
/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/downloader.rb:160:in `ui_sub_action'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-downloader-0.9.3/lib/cocoapods-downloader/git.rb:61:in `clone'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-downloader-0.9.3/lib/cocoapods-downloader/git.rb:29:in `download!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-downloader-0.9.3/lib/cocoapods-downloader/base.rb:80:in `block in download'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader.rb:145:in `block in ui_action'
/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/downloader.rb:144:in `ui_action'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-downloader-0.9.3/lib/cocoapods-downloader/base.rb:78:in `download'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader.rb:110:in `download_source'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader.rb:65:in `download_request'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader/cache.rb:170:in `download'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader/cache.rb:153:in `block in uncached_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader/cache.rb:180:in `call'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader/cache.rb:180:in `in_tmpdir'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader/cache.rb:152:in `uncached_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader.rb:34:in `download'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/pod_source_installer.rb:103:in `download_source'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/pod_source_installer.rb:53:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:328:in `install_source_of_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:303:in `block (2 levels) in install_pod_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:80:in `titled_section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:302:in `block in install_pod_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:294:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:294:in `install_pod_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:143:in `block in download_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:141:in `download_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:105: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:156: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/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
From github.com:CocoaPods/Specs
c909018..d84a7e5 master -> origin/master
dyld: warning, LC_RPATH @executable_path/../../../../../../../SharedFrameworks in /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/../../..//DVTInstrumentsFoundation.framework/Versions/A/DVTInstrumentsFoundation being ignored in restricted program because of @executable_path
dyld: warning, LC_RPATH @executable_path/../lib in /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/Versions/A/../../../../Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib being ignored in restricted program because of @executable_path
dyld: warning, LC_RPATH @executable_path/../lib in /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/Versions/A/../../../../Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib being ignored in restricted program because of @executable_path
dyld: warning, LC_RPATH @executable_path/../Frameworks in /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/MacOS/Xcode3Core being ignored in restricted program because of @executable_path
Cloning into '/var/folders/82/xnzs001n09dccsqt27tn7lsw000087/T/d20151001-65980-h1swsx'...
fatal: could not read Username for 'https://github.com': Device not configured
As cocoapods normally does, the pods start getting installed in alphabetical order. When it hits the first pod that I made however, it errors out.
-> Installing AFNetworking (2.6.0)
> Copying AFNetworking from `/var/_xcsbuildd/Library/Caches/CocoaPods/Pods/Release/AFNetworking/2.6.0-79f7e` to `Pods/AFNetworking`
-> Installing Archimedes (1.1)
> Copying Archimedes from `/var/_xcsbuildd/Library/Caches/CocoaPods/Pods/Release/Archimedes/1.1-a181c` to `Pods/Archimedes`
-> Installing Pod B (0.5.4)
> Git download
> Git download
$ /usr/local/bin/git clone https://github.com/busycm/Pod B.git /var/folders/82/xnzs001n09dccsqt27tn7lsw000087/T/d20151001-65980-h1swsx --single-branch --depth 1 --branch 0.5.4
[!] Error installing Pod B
[!] /usr/local/bin/git clone https://github.com/busycm/Pod B.git /var/folders/82/xnzs001n09dccsqt27tn7lsw000087/T/d20151001-65980-h1swsx --single-branch --depth 1 --branch 0.5.4
As I mentioned before, Pod B is my private cocoapod that's a dependency of Pod A, which is a pod in my main project.
It all comes down to this error:
Cloning into '/var/folders/82/xnzs001n09dccsqt27tn7lsw000087/T/d20151001-65980-h1swsx'...
fatal: could not read Username for 'https://github.com': Device not configured
Which I have no idea what that means or how to solve it.
I'm using Xcode 7.0.1 and Server 5.0.1 with Cocoapods version 0.38
I've been trying to setup OS X Server and Xcode bots to do some CI for my projects but I've been running into no end of trouble with getting Cocoapods to play nicely.
Setup:
I have one main project that has about 30 pods. Most of them are 3rd party libraries (ReactiveCocoa, AFNetworking, etc) but 3 of them are pods that I made. One of the three is public (https://github.com/busycm/BZYStrokeTimer) and the other two are private. Of the two private pods, my project only includes one of them (we'll call this Pod A) and the other (Pod B) is a dependency in the podspec of Pod A. Both live in the same private repo on my machine which is in turn hosted in a private repo on Github.
I've been following this guide from the venerable @czechboy0 and I've been able to replicate most if not all of the steps. I gave
_xcsbuildd
new ssh keys which I then added to Github and was able to verify that they worked correctly, both by cloning my project and runningssh -vT git@github.com
(this ran successfully both on my user and_xcsbuildd
).I then setup a bot with the following pre-integration run script:
Then when I run the integration, it always errors out on the run script with the following output: (TL;DR, skip to bottom for summary)
As cocoapods normally does, the pods start getting installed in alphabetical order. When it hits the first pod that I made however, it errors out.
As I mentioned before, Pod B is my private cocoapod that's a dependency of Pod A, which is a pod in my main project.
It all comes down to this error:
Which I have no idea what that means or how to solve it.
I'm using Xcode 7.0.1 and Server 5.0.1 with Cocoapods version 0.38