New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error resolving package name for private github repo #1262

Closed
eriknil opened this Issue Jul 13, 2016 · 12 comments

Comments

Projects
None yet
9 participants
@eriknil

eriknil commented Jul 13, 2016

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.
@eriknil

This comment has been minimized.

eriknil commented Jul 13, 2016

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.

@DavidSichau

This comment has been minimized.

DavidSichau commented Oct 19, 2016

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

@eriknil

This comment has been minimized.

eriknil commented Oct 19, 2016

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.

@jimhester

This comment has been minimized.

Member

jimhester commented Oct 19, 2016

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.

@dy-kim

This comment has been minimized.

dy-kim commented Oct 28, 2016

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

Oh, I've checked it.

@hadley hadley added bug install labels Nov 3, 2016

ajdamico added a commit to DjalmaPessoa/convey that referenced this issue Dec 9, 2016

use cran monetdblite
@guilhermejacob  this will stop install_github from failing at
r-lib/devtools#1262  but we probably will get
travis segfaults

cc @hannesmuehleisen
@jucor

This comment has been minimized.

jucor commented Feb 2, 2017

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 :)

@jimhester

This comment has been minimized.

Member

jimhester commented Feb 2, 2017

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

@jucor

This comment has been minimized.

jucor commented Feb 2, 2017

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)

@kirillseva

This comment has been minimized.

kirillseva commented Apr 5, 2017

@deanchen

This comment has been minimized.

deanchen commented Apr 11, 2017

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

@cmdcolin

This comment has been minimized.

cmdcolin commented May 24, 2017

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

@hadley hadley closed this Aug 2, 2017

@lock

This comment has been minimized.

lock bot commented Sep 18, 2018

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/

@lock lock bot locked and limited conversation to collaborators Sep 18, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.