本文介绍了如何使用devtools install_github从私人回购安装R包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从我的github repo安装一个示例包:


请在底部查看?install_github 方式(Package devtools

I am trying to install a sample package from my github repo:https://github.com/jpmarindiaz/samplepkg

I can install it when the repo is public using any of the following commands through the R interpreter:

  • install_github("jpmarindiaz/rdali")
  • install_github("rdali",user="jpmarindiaz")
  • install_github("jpmarindiaz/rdali",auth_user="jpmarindiaz")

But when the git repository is private I get an Error:

Installing github repo samplepkg/master from jpmarindiaz
Downloading samplepkg.zip from
https://github.com/jpmarindiaz/samplepkg/archive/master.zip
Error: client error: (406) Not Acceptable

I haven't figured out how the authentication works when the repo is private, any hints?

解决方案

Have you tried setting a personal access token (PAT) and passing it along as the value of the auth_token argument of install_github()?

See ?install_github way down at the bottom (Package devtools version 1.5.0.99).

这篇关于如何使用devtools install_github从私人回购安装R包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 15:40