【问题标题】:Using private GitHub package with ShinyApps.io使用带有 ShinyApps.io 的私有 GitHub 包
【发布时间】:2021-05-25 01:32:43
【问题描述】:

我无法让我的 ShinyApps.io 帐户安装私有 GitHub 依赖项:

首先,在 ShinyApps.io 上,我已授权访问私有存储库:

其次,在我正在部署的包中,我已将私有依赖项作为Remotes 包添加到DESCRIPTION 文件中:

Remotes:
    myOrg/myDependency

第三,ShinyApps.io 是 GitHub 上存储库设置下的授权应用程序。

但是,当我尝试手动部署时,ShinyApps 无法找到myDependency。我收到一条错误消息:

Warning: Unable to determine the repository for package myDependency

我还需要检查什么以确保 ShinyApps.io 可以访问并使用我的依赖项

【问题讨论】:

    标签: r github shinyapps


    【解决方案1】:

    专注于让这项工作发挥作用,而不一定是这里最优雅或最正确的解决方案。

    1. https://github.com/settings/applications 撤消对 shinyapps 的访问权限,并重新建立与 shinyapps 的连接(如果您的依赖项存储库由组织而非您个人所有,请确保包括组织授权)。

    1. 从 github 安装依赖项作为 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 存储的评论:

    要从私有仓库安装,请使用带有令牌的 auth_token 来自https://github.com/settings/tokens。你只需要 回购范围。最佳做法是将您的 PAT 保存在名为 GITHUB_PAT。

    Reference


    1. 支持票?在我看来,这里的 github 进程的任何内容都不够冗长,无法知道到底发生了什么。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-06-30
      • 1970-01-01
      • 2017-01-29
      • 2023-03-09
      • 2018-03-04
      • 1970-01-01
      • 2020-02-12
      • 1970-01-01
      相关资源
      最近更新 更多