RStudio Connect does not need to be configured for that. This is explained in the part about private repositories
RStudio Connect supports private repositories in these situations given that the deploying instance of R is correctly configured. No adjustment to the RStudio Connect server is needed.
Repository information is configured using the
repos R option. Your users will need to make sure their desktop R is configured to use your corporate repository.
What happens is:
- Your deployment is prepared through
rsconnect that will look for dependencies collecting there version and also the repo they were install from
- This happens by looking at the current repositories configured on the system from where the deployment happens.
- All those information are then sent to Connect that will try to recreate the environment by fetching missing packages and version from the repo that the deployments tells to look into. This is all due to packrat mechanism internally.
As explained in the doc linked above you can configure you repos in an option to put in .Rprofile. With you scenario, this would be something like
r <- getOption("repos")
r["A"] <- "https://cran.mycompany.com/"
r["B"] <- "http://rpackages.mycompany.com/"
options(repos = r)
You would then need to make sure the package you have installed locally are installed from thoses repositories. I don't know if it is a prerequisite but it is surely better.
Also, You RStudio connect serveur MUST have acces to your Package Manager on the network.