简体   繁体   English

从私人SVN安装R包

[英]Install R package from private svn

I have a private svn accessible via http after a login and I am able to read it with a simple curl , like so: 登录后,我有一个可以通过http访问的私有svn,并且可以使用curl进行读取,如下所示:

curl --user username:password http://myrepo/mypackage/trunk

Is there a way to get the same behaviour and install the package in R using install.packages() ? 有没有办法获得相同的行为并使用install.packages()在R中安装软件包?

The following returns a 401 Unauthorized error: 以下返回401 Unauthorized错误:

install.packages("http://myrepo/mypackage/trunk", repos = NULL, type = "source")

This seems to work: 这似乎可行:

install.packages("http://myrepo/mypackage/trunk", repos = NULL, type = "source", method="curl", extra = "--user username:password")

Alternatively with the following the password is requested and typed interactively: 或者使用以下命令要求输入密码并交互输入:

 install.packages("http://myrepo/mypackage/trunk", repos = NULL, type = "source", method="curl", extra = "--user=username --password=pwd")

Similarly it works with wget: 同样,它与wget一起工作:

 install.packages("http://myrepo/mypackage/trunk", repos = NULL, type = "source", method="wget", extra = "--user=username")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM