让我的ShinyApps.io帐户安装私有GitHub依赖项时遇到问题:
首先,在ShinyApps.io上,我拥有授权的私有存储库访问权限:

其次,在我正在部署的包中,我在DESCRIPTION文件中添加了私有依赖项作为Remotes包:
Remotes:
myOrg/myDependency第三,在存储库设置下,ShinyApps.io是GitHub上的授权应用程序。
但是,当我尝试手动部署时,ShinyApps无法找到myDependency。我得到一个错误,指出:
Warning: Unable to determine the repository for package myDependency我还需要检查什么,以确保ShinyApps.io可以访问并使用我的依赖项
发布于 2021-02-26 19:43:06
我将专注于让它工作,而不一定是这里最优雅或最正确的解决方案。
source脚本,作为应用程序启动的一部分-类似于:
app.r
library(dplyr)
library(shiny)
source(private_dependency.R)
*app code here*private_dependency.R
library(devtools)
install_github("hadley/private", auth_token = "abc")其中auth_token是您在以下位置生成的值:https://github.com/settings/tokens
文档中关于auth_token存储的评论:
要从私有存储库安装,请使用带有来自https://github.com/settings/tokens的令牌的auth_token。您只需要repo作用域。最佳实践是将PAT保存在名为GITHUB_PAT的环境变量中。
Reference
https://stackoverflow.com/questions/66321952
复制相似问题