I have a private svn accessible via http
after a login and I am able to read it with a simple curl
, like so:
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()
?
The following returns a 401 Unauthorized
error:
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:
install.packages("http://myrepo/mypackage/trunk", repos = NULL, type = "source", method="wget", extra = "--user=username")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.