Deploy a CRAN Package Using cURL

JFrog Artifactory Documentation


Deploy source package

curl -XPOST "http://localhost:8080/artifactory/api/cran/cran-local/sources" -T package_1.0.tar.gz

Deploy binary package

curl -XPOST "http://localhost:8080/artifactory/api/cran/cran-local/binaries?distribution=macosx/el-capitan&rVersion=3.5" -T package_1.0.tgz
curl -XPOST "http://localhost:8080/artifactory/api/cran/cran-local/binaries?distribution=windows&rVersion=3.5" -T

When deploying a CRAN binary package, you need to specify the distribution and R version as before.

When deploying directly (PUT request to a specific path), make sure the target path is a valid CRAN path:

  • /src/contrib for sources

  • /bin/{distribution}/contrib/{r-version} for binaries.

Deploying a package to a different path will not identify the package as CRAN packages, and will not invoke the metadata indexing.