在 Shinyapp.io 上使用私有组织存储库中的包部署闪亮的应用程序 [英] Deploy shiny app on shinyapp.io with package in private organization repo

查看:22
本文介绍了在 Shinyapp.io 上使用私有组织存储库中的包部署闪亮的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to deploy a shiny app to the shinyapps.io server, but keep getting an error relating to a custom-built package that is hosted in a private github repo owned by our organization (note that I have replaced the actual name of the package, company name, and private repo name in the error below):

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 范围.

I know the repo link is good, because installing via devtools::install_github("ORGANIZATION/PRIVATE_REPO, auth_token = token works. I'm an admin for the organization page, and also made sure that token has both repo and admin:org scope.

我还确保在我的 Shinyapps.io 帐户页面中勾选私人存储库访问",如此处.

I've also made sure to tick "Private Repository Access" in my shinyapps.io account page as stated here.

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

Anyone have any thoughts on what I might be doing wrong??

谢谢!

推荐答案

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

Create an .Rprofile file in your project folder that you would intend to deploy.

您需要在 .Rprofile 中设置该 repo 选项.并添加您的私人 github 链接.类似的东西

You would need to set that repo options in the .Rprofile. and add your private github link. Something like

# 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)
})

这里有很好的解释.RStudio Connect 中的包管理.

这篇关于在 Shinyapp.io 上使用私有组织存储库中的包部署闪亮的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆