gpt4 book ai didi

github - 在 shinyapp.io 上部署 Shiny 的应用程序,并在私有(private)组织仓库中使用包

转载 作者:行者123 更新时间:2023-12-04 16:21:16 26 4
gpt4 key购买 nike

我正在尝试将 Shiny 的应用程序部署到 shinyapps.io 服务器,但不断收到与托管在我们组织拥有的私有(private) github 存储库中的定制包相关的错误(请注意,我已经替换了实际名称以下错误中的包、公司名称和私有(private)仓库名称):

error: Building package: [PACKAGE NAME]
################################ Begin Task Log
################################
################################# End Task Log
#################################
Error: Unhandled Exception: Child Task 530176316 failed: Error building
image: Error fetching [PACKAGE NAME] (1.0.2) source. Error accessing GitHub
repository ORGANIZATION/PRIVATE_REPO. HTTP 404: Not Found

我知道 repo 链接很好,因为通过 devtools::install_github("ORGANIZATION/PRIVATE_REPO, auth_token = token 安装作品。
我是组织页面的管理员,并确保 token同时具有 repo 和 admin:org 范围。

我还确保在我的 shinyapps.io 帐户页面中勾选“私有(private)存储库访问”,如 here 所述。 .

有人对我可能做错了什么有任何想法吗?

谢谢!

最佳答案

创建 .Rprofile您打算部署的项目文件夹中的文件。

您需要在 .Rprofile 中设置该 repo 选项。 .并添加您的私有(private) github 链接。就像是

# A sample .Rprofile file with two different package repositories.
local({
r <- getOption("repos")
r["CRAN"] <- "https://cran.rstudio.com/"
r["mycompany"] <- "http://rpackages.mycompany.com/"
options(repos = r)
})

这在这里得到了很好的解释。 Package management in RStudio Connect .

关于github - 在 shinyapp.io 上部署 Shiny 的应用程序,并在私有(private)组织仓库中使用包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50729735/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com