【问题标题】:failing to devtools::install_github() from an enterprise github account未能从企业 github 帐户 devtools::install_github()
【发布时间】:2021-10-24 07:36:47
【问题描述】:

我正在尝试从企业 github 帐户安装 R 包

devtools::install_github(
  repo = "<owner>/<repo>",
  host = "github.<org_name>.com/api/v3/",
  auth_token = <my_github_pat>
)

我收到此错误消息 Error: Failed to install '&lt;repo&gt;' from GitHub: HTTP error 404. Not Found Did you spell the repo owner ('&lt;owner&gt;') and repo name ('&lt;repo&gt;') correctly? - If spelling is correct, check that you have the required permissions to access the repo.

我有正确的拼写,我认为我必须拥有所需的权限,因为它实际上是我的回购:我可以从回购中推送和拉取就好了。我正在将install_github() 作为测试用例,以便同事可以安装我的包,但我无法理解此错误消息。

【问题讨论】:

  • 已经有一段时间了,但我认为这已经出现了,并且在 GHE 下回购的路径是不同的——所以即使你把拍拍平,它也不会“正常工作”。跨度>

标签: r github devtools


【解决方案1】:

实际上只需要删除主机字符串中的最后一个“/”就可以了。 SMH

devtools::install_github(
  repo = "<owner>/<repo>",
  host = "github.<org_name>.com/api/v3",
  auth_token = <my_github_pat>
)

【讨论】:

  • 很好,所以只有 host= 参数来处理更改的路径。
猜你喜欢
  • 1970-01-01
  • 2011-11-05
  • 2012-06-27
  • 1970-01-01
  • 1970-01-01
  • 2019-07-01
  • 1970-01-01
  • 2014-09-12
  • 1970-01-01
相关资源
最近更新 更多