It's probably (way) too late now, but just having stumbled over this, I'd vote for encoding it in the URL.
What tripped me up was that, in part, the client platform did seem to be encoded in the URL as in "https://packagemanager.rstudio.com/all/__linux__/bionic/279"
(bionic
).
This lead me to tacitly assume that I'd be all set, and it took me a while to compare options()
between different images until I found the difference option("HTTPUserAgent")
.
Of course I should have just read the manual, which is pretty clear on this:
If this diagnostic fails, R should be configured to include the R version and OS in the user agent header:
# Set the default HTTP user agent options(HTTPUserAgent = sprintf("R/%s R (%s)", getRversion(), paste(getRversion(), R.version$platform, R.version$arch, R.version$os)))
But since that document is the admin guide, and I wasn't administering RSPM, but just using it, I never thought to look.
Perhaps this is another thing that might be surfaced more prominently, such as when the user copies the URL?
I understand that RStudio might be a bit cautious about this, because you can't guarantee that the binaries will work on all, say, any bionic
and R 3.6.3
boxes out there, and the (somewhat arcane?) HTTPUserAgent
makes sure that it effectively only works on RStudio-sanctioned images.
This also seems to have tripped up RStudio Package Manager 1.1.0 is out now.