Configuring Repositories and Deploying Content
By the end of this lesson, you will be able to:
- Explain how Connect determines which repositories are used to install packages for deployed content
- Distinguish between the “lax” and “strict” package repository resolution settings
- Describe the benefits of pointing Connect at Posit Package Manager
- Recognize how deploying content confirms that your installation is ready
Introduction
The content your developers deploy to Connect, whether written in R or Python, relies on packages and libraries distributed by repositories such as CRAN and PyPI. Configuring which repositories Connect uses is the last step of the installation, and deploying content is the proof that everything works.
This lesson explains how Connect resolves package repositories for R and Python, and how it integrates with Posit Package Manager. The accompanying lab has you configure both repositories and deploy R and Python content to verify your installation.
- Reading time: 10 minutes
- Documentation reading time: 35-45 minutes
- Hands-on exercise time: 20-30 minutes
How Connect Resolves Repositories
When developers deploy content to Connect, the repositories they used to install packages are recorded and uploaded with the content. As an administrator, you can configure the Connect server to complement these repositories or to ignore them, with the R.PackageRepositoryResolution and Python.PackageRepositoryResolution settings:
lax(the recommended setting): the list of repositories used by the developer and the list from the Connect configuration file are merged, with the list from the Connect configuration taking precedence.strict: the repositories used by the developer are ignored, and only repositories listed in the Connect configuration file are used. For content to deploy successfully with this setting, your developers must use the same repositories in their development environment. This setting is only recommended in security-conscious environments.
Posit Package Manager and Connect
Posit Package Manager is a repository management solution that makes it easy to centralize the management of the R packages and Python libraries used by your developers. A publicly available version exists that you can use right away; with a license, you can host an offline version of CRAN (useful for air-gapped environments), curate the list of approved packages in your organization, and host private packages.
Both the public and licensed versions build binary R packages for Linux distributions. This speeds up content deployment considerably, because packages do not need to be compiled on the Connect server. Connect also provides settings to control the installation of binary packages.
While you can configure pip or uv at the system level by editing /etc/pip.conf or /etc/uv/uv.toml, the repository settings in Connect’s configuration file take precedence for deployed content. Editing those system files can still be useful for additional settings such as timeouts or trusted hosts.
Verifying the Installation by Deploying Content
The final step of the installation is also the best verification that everything works: deploy content.
Connect provides several ways to publish, and the lab uses the Connect Gallery, a collection of ready-to-deploy assets hosted on GitHub that require no coding or setup. Deploying an R example and a Python example from the Gallery exercises the whole stack: the runtimes you installed, the repositories you configured, and the permissions of the account you publish with.
You can then inspect the deployment logs and confirm that Connect is downloading R binary packages from Package Manager and Python libraries from the repository you configured, rather than from the public registries.
- Faster deployments: binary R packages from Package Manager remove compilation time from every deployment on Linux.
- Governance: pointing Connect at repositories you control is what makes your package blocklists, curated sources, and vulnerability scanning apply to published content. If Connect bypasses Package Manager, none of those controls apply.
- Predictability: the “lax” versus “strict” choice lets you match deployment behavior to your organization’s security posture.
As you plan your own installation, ask your teams which repositories they want enabled in Connect for R and Python, and whether there are any concerns with using pre-compiled binaries for R packages.
In the accompanying lab, you will configure the R and Python repositories Connect uses, deploy R and Python content from the Gallery, and verify in the deployment logs that packages are coming from your configured repositories.