I am encountering issues with the Rprofile.site configuration for our workbench pro server.
In particular, we have custom frozen versions of R in /opt/R/x.y.z, and I would like to link to each of them a snapshot of CRAN from Rstudio Public Package Manager.
So, as I found in many resources also from RStudio, I created the /opt/R/x.y.z/lib/R/etc/Rprofile.site and, inside, I put (only), e.g., for x.y.z = 4.1.3:
I have tried to restart the server, to remove user- and project-level .Rprofile(s), the result is still the same.
I would need to set a default repo for users who do not set it on their own; how can I investigate/solve that?
This is a long shot, but are you including a trailing empty line after saving? Otherwise R won’t source this, at least I have learned at the user-level
If you run the respective R version from the command line, e.g. /opt/R/x.y.z/bin/R -q -e 'getOption("repos")', does it report the correct/expected output there ? If this works, then something eclipses this setting on the Workbench side.
If the behaviour is the same for all users, it could be a system setting. Can you maybe check for the existence of the RSW config files/parameters as specified at Setting Default Repositories - RStudio :: Solutions ?
If this does not help, it still could be a setting in your local user account under ~/.local/share/rstudio. You could simply move this folder out of the way for a moment, start a new session and see if this changes things.
PS: There is one scenario where RSW defines the CRAN repo in the way you find in your system (pointing to https://cran.rstudio.com - this is when there is no repo defined on neither the R nor the RSW side.