Artifactory Cocoapods include/white list

2019-09-11 18:15发布

问题:

In our company we are establishing Artifactory into our toolchain. We have now a remote repository for the CocoaPods repository. As we are required to control the pods that are used, we would like to white list allowed pods with the include function.

So if we use a repository without restriction, everything works fine. But if we have an include pattern for a library, e.g. see print screen, then we get an error on the fetchIndex request of Artifactory. In the logs, this is what it looks like:

20161216094625|3|REQUEST|someIP|username|GET|/api/pods/cocoapods-master/index/fetchIndex|HTTP/1.1|404|0

Does anybody have made experiences with white listing pods through artifactory?

回答1:

Artifactory caches the index under the .specs folder in your cocoapods repository whether it is a local repo or a remote one (it will be in the cache repo if remote).

The index is cached mostly for performance reasons, and is required for the normal flow of the cocoapods repo-art plugin, and any other remote repositories that point to it.

Simply add an include pattern for the .specs folder as well and it should work for you.