cocoapods 提示:无法添加与URL源

我想在我的项目来更新我的第三方库(执行pod install),但收到以下错误显示。

Update all pods
Analyzing dependencies
sh: line 1: 23831 Abort trap: 6           /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk / -find git 2> /dev/null
git: error: unable to find utility "git", not a developer tool or in PATH
sh: line 1: 23834 Abort trap: 6           /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk / -find git 2> /dev/null
git: error: unable to find utility "git", not a developer tool or in PATH
Creating shallow clone of spec repo `master-1` from `https://github.com/CocoaPods/Specs.git`
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

解决:

它看起来像Xcode的路径设置错了,加载了Xcode的喜好,并确保命令行工具选项设置为你想要什么

cocoapods 提示:无法添加与URL源_第1张图片

你可能感兴趣的:(iOS)