我正在尝试从artifactory安装R包,而且我需要进行身份验证,但我不确定如何将凭据传递给R中的install.packages:
下面是我尝试过的,但它不起作用,但是当我尝试使用curl来查询同一个文件时它起作用了:
install.packages('broom',repos="http://user:pass@artifactory-url:port/artifactory/cran/",method=curl,verbose="true")
输出:
警告:无法访问存储库索引http://user:pass@artifactory-url:port/artifactory/cran/src/contrib: 无法打开 URL 'http://user:pass@artifactory-url:port/artifactory/cran/src/contrib/PACKAGES' 警告信息: 包“broom”不可用(对于 R 版本 3.3.2)
Artifactory 支持 R 包的 CRAN 存储库,您可以在此处
找到文档