pod search 出现的错误

  • pod search 报错
[!] CDN: trunk Repo update failed - 2 error(s):
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/7/d/e/AFNetworking+Ext/0.5/AFNetworking+Ext.podspec.json, error: execution expired

解决方法 :
1.podfile文件中指定source源为master
source 'https://github.com/CocoaPods/Specs.git'
2.执行pod repo remove trunk 移除 trunk 源
执行完后,pod search 就正常了

MacBook-Pro:~ $ pod repo list
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19/rbconfig.rb:229: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777

master
- Type: git (master)
- URL:  https://github.com/CocoaPods/Specs.git
- Path: /Users/sujicheng/.cocoapods/repos/master

trunk
- Type: CDN
- URL:  https://cdn.cocoapods.org/
- Path: /Users/sujicheng/.cocoapods/repos/trunk

2 repos
MacBook-Pro:~ $ pod repo remove trunk
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19/rbconfig.rb:229: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
Removing spec repo `trunk`
注意: podfile文件中一定要指定master源,因为默认是trunk

source 'https://github.com/CocoaPods/Specs.git'

你可能感兴趣的:(pod search 出现的错误)