Share Projects with GitHub
- View GitHub Slides
- General GitHub and Git Information
- Connect with GitHub
- Additional Pages
General GitHub and Git Information
- GitHub Links (UW-Madison-DataScience)
- Get started with GitHub (Happy Git with R)
- Git and GitHub Troubleshooting
- Install Git for Windows (Git-SCM)
- Install Git (Git Guides)
Connect with GitHub
Posit’s Connect is a platform for sharing resources such as R shiny apps, Quarto documents, and python apps.
Deployment of apps using GitHub repos to a Connect server can be tricky, as Connect relies on the renv package to create reproducible environments for your R projects. A message like Deployment error: unknown package source indicates that the renv package does not recognize where a package was installed, for instance if one uses devtools::install_github(). renv cannot track the source well enough to reproduce it, and it refuses to bundle the app as a result. The fix is to reinstall the package using renv::install() instead, which records the GitHub source in a way that renv can reproduce:
renv::install("github_user/package_name")
renv::snapshot()
After running those two lines, retry the deployment. The snapshot validator should pass and the bundle should reach the server cleanly. If for any reason that does not work, you can also try explicitly recording the source before deploying:
renv::record("github_user/package_name")