CocoaPods: Unable to locate the executable `git`

我与影子孤独终老i 提交于 2019-12-01 13:46:59

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

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!