首页 > 解决方案 > 为什么 runGitHub 在我的公共 github 存储库中抛出一个错误,其中包含一个工作的 shinyapp?

问题描述

我在公共 Github 存储库上发布了一个可用的闪亮应用程序(今天):我尝试了下面的行从脚本运行应用程序,但收到以下错误。

shiny::runGitHub(repo = "<repo>",
                 username = "<username>")

# I have also tried:
# shiny::runGitHub(repo = "<username>/<repo>")

Downloading https://github.com/<username>/<repo>/archive/master.tar.gz
Error in utils::download.file(url, method = method, ...) : 
  cannot open URL 'https://github.com/<username>/<repo>/archive/master.tar.gz'

任何想法为什么会发生这种情况?

标签: rgithubshiny

解决方案


有效的解决方案来自这里: https ://community.rstudio.com/t/run-shiny-app-from-github-repository/89839 关键是参数ref="main"

shiny::runGitHub(repo = "<repo>",username = "<username >",ref="main")

推荐阅读