2

我尝试pod install了命令并收到此错误。

% pod install
Analyzing dependencies
[!] CDN: trunk Repo update failed - 18 error(s):
CDN: trunk URL couldn't be downloaded: 

    https://cdn.jsdelivr.net/cocoa/Specs/1/d/4/CocoaAsyncSocket/0.0.1/CocoaAsyncSocket.podspec.json Response: 302 <html>
    <head><title>302 Found</title></head>
    <body bgcolor="white">
    <center><h1>302 Moved Temporarily</h1></center>
    <hr><center>Umbrella Cloud Security Gateway</center>
    </body>
    </html>
    
    CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/1/d/4/CocoaAsyncSocket/7.0.3/CocoaAsyncSocket.podspec.json Response: 302 <html>
    <head><title>302 Found</title></head>
    <body bgcolor="white">
    <center><h1>302 Moved Temporarily</h1></center>
    <hr><center>Umbrella Cloud Security Gateway</center>
    </body>
    </html>
    
    CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/1/d/4/CocoaAsyncSocket/7.2.2/CocoaAsyncSocket.podspec.json Response: 302 <html>
    <head><title>302 Found</title></head>
    <body bgcolor="white">
    <center><h1>302 Moved Temporarily</h1></center>
    <hr><center>Umbrella Cloud Security Gateway</center>
    </body>
    </html>

我尝试了一切,但仍然收到此错误。

4

1 回答 1

2

对于其他任何有这个确切错误的人。在与我们的安全团队反复讨论之后,他们能够通过将 cdn.jsdelivr.net 域列入白名单来“解决”这个问题。

该问题源于我们的云安全软件(Cisco Umbrella)导致 Cocoapods 尝试访问该域时返回 302 代码。Cocoapods(截至此响应时为 v1.10.1)不处理 302 代码并引发您在原始帖子中看到的错误。

您可以在这里看到 Cocoapods Ruby 代码抛出错误:https ://github.com/CocoaPods/Core/blob/1.10.1/lib/cocoapods-core/cdn_source.rb#L372-L417

于 2021-02-11T20:06:29.810 回答