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

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

问题描述

我正在尝试将闪亮的应用程序部署到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

我知道存储库链接很好,因为通过 devtools :: install_github( ORGANIZATION / PRIVATE_REPO,auth_token =令牌有效。
我是组织页面的管理员,并且还确保 token 具有仓库和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 中设置该回购选项,然后添加您的私有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中的软件包管理

This is well explained here. Package management in RStudio Connect.

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

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