user944351
user944351

Reputation: 1213

CocoaPods: Unable to locate the executable `git`

I've already installed a pod successfully (SDWebImage) and now trying to add a Library called "MFSideMenu". My Podfile looks the following:

platform :ios, '6.0'

pod 'SDWebImage', '3.2'
pod 'MFSideMenu'

When i do a "pod install", i get the following (error-) output:

Analyzing dependencies
Downloading dependencies
Installing MFSideMenu (0.4.8)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems                 
/custom_require.rb:31: command not found: git config remote.origin.url
[!] Unable to locate the executable `git`

Does anybody know whats the problem here?

Thanks in advance!

Upvotes: 1

Views: 4322

Answers (2)

Markoorn
Markoorn

Reputation: 2565

I had the same issue but had git installed - I followed the workaround outlined here: https://github.com/CocoaPods/CocoaPods/issues/6923

Windows binaries end in .exe which CocoaPods doesn't seem to take into account, so editing the file executable.rb (mine was in <RubyLocation>\lib\ruby\gems\2.5.0\gems\cocoapods-1.5.3\lib\cocoapods) and changing the following lines:

bin = File.expand_path(program, path)

to

bin = File.expand_path(program, path) exe = bin + ".exe"

and

if File.file?(bin) && File.executable?(bin)

to

if (File.file?(bin) && File.executable?(bin)) || (File.file?(exe) && File.executable?(exe))

Resolved it.

Upvotes: 9

Simon
Simon

Reputation: 26013

You don't have git installed. Most software distributed using CocoaPods uses github for hosting and git for distribution. You need to install git.

Upvotes: 3

Related Questions