cocoapods 使用pod install失效解决方法

在使用pod install命令后,一直处于analyzing dependencies的状态,之后出现error:

[!] An error occurred while performing `git pull` on repo `master`. [!] /usr/bin/git pull --ff-only From https://github.com/CocoaPods/Specs    81a48d2..2185a7f  master     -> origin/master fatal: Not possible to fast-forward, aborting.

的错误消息。

解决方法:重新设置cocoapods的repo:

进入:~/.cocoapods/repos

删除下面的master目录

sudo rm -rf master

然后再使用pod setup命令

原文地址:https://www.cnblogs.com/rambot/p/3878727.html