Devtools: Error resolving package name for private github repo

Created on 13 Jul 2016  路  12Comments  路  Source: r-lib/devtools

I'm running into some problems when installing and resolving dependencies for packages that imports/depends on packages in a private github repo.

> deps <- devtools::dev_package_deps(dependencies = TRUE)
Using GitHub PAT from envvar GITHUB_PAT
Using GitHub PAT from envvar GITHUB_PAT
Error in data.frame(package = package, installed = installed, available = available,  : 
  row names contain missing values
> 

The issue seems to be that we are not authenticating to Github when trying to resolve the package name. We then end up getting an error message when trying to construct a data.frame of named vectors with NA names.

I'm submitting a pull request for a solution where we:

  1. Use the oath_token to authenticate before downloading the DESCRIPTION file.
  2. Download the description from https://raw.githubusercontent.com/user/repo/... instead of https://github.com/user/repo/RAW/.... For some reason the latter approach doesn't seem to work.
bug install

Most helpful comment

It will likely be merged eventually next time we are doing devtools maintenance.

In the meantime you can add r_github_packages: hadley/devtools#1263 to your .travis.yml and it would use the code from that pull request to install dependencies.

All 12 comments

We get the same error when specifying a remote package in the DESCRIPTION that doesn't exist.

I've uploaded a package on eriknil/depError that will fail to install because of this. Reproducible example below:

> devtools::install_github("eriknil/depError")
Downloading GitHub repo eriknil/depError@master
from URL https://api.github.com/repos/eriknil/depError/zipball/master
Installing depError
Error in data.frame(package = package, installed = installed, available = available,  : 
  row names contain missing values
> 

I updated the PR to fix this.

We have currently the same problem, is there any chance that this pull request can be accepted?

I ended up using the old r-travis instead. Had to change a few things but this allowed me to install my own fork of devtools. Just a temporary solution though.

Would be glad to update the PR if there's anything else needed.

It will likely be merged eventually next time we are doing devtools maintenance.

In the meantime you can add r_github_packages: hadley/devtools#1263 to your .travis.yml and it would use the code from that pull request to install dependencies.

@jimhester Is it r_github_packages: hadley/devtools#1263, not r_github_packages: hadley/devtools#1262?

Oh, I've checked it.

Hi @jimhester , @hadley : any chance you'd share no-commitment guesstimate when is the "next time [you] are doing devtools maintenance"? Promise, we won't hold you to it, but it's been 3 months since your message, Jim :)

The plan is to do major package development work in the next month or so

Great, thanks a lot for the quick answer and the heads up @jimhester! (and it is pre-emptively understood that "plan" and "reality" do not always match)

@jimhester ;)

Would be great if we can get this supported within devtools. We've been maintaining a forked version of devtools for this reason.

This is just a random note but I ran into this same error message when I had a "Remotes:" line in my description file that separated the two things by spaces instead of comma, and then installed the app via install_github. If devtools was able to catch that error it would be great ;) but otherwise just thought I'd add that note for posterity

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sckott picture sckott  路  14Comments

SimonHStats picture SimonHStats  路  25Comments

kenahoo picture kenahoo  路  13Comments

bgreenwell picture bgreenwell  路  9Comments

shanedp picture shanedp  路  9Comments