Re: [R] download.file() / install.packages() from a url with a username and password

From: Seth Falcon <sfalcon_at_fhcrc.org>
Date: Wed 06 Jul 2005 - 05:19:43 EST

On 30 Jun 2005, john.marsland@wmgfunds.com wrote:

> I am trying to create a repository for my own packages as an easy
> way to auto install packages on a number of servers.
>
> Obviously, I am able to connect using install.packages() to CRAN
> without problems but when I specify my own repos I get an error:
>
>> install.packages(pkgs, repos="http://some.site.com")
> Warnings message:
> cannot open: HTTP status was '401 Authorisation Required'
>
> I get a similar message if I try to use download.file() on the
> PACKAGES file.
>
> I have tried the url in the form http://username:password@url.com.
>
> Any ideas?

Are you expecting your webserver to require authentication? If not, well, I think you have a server config issue.

Assuming you have configured authentication, I suspect it will be difficult to get install.packages to play along.

Perhaps there is another way you can protect the site. For example, only allow local connections and then use ssh port forwarding to connect to the site from "outside".

+ seth



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jul 06 05:23:28 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:16 EST