remotes icon indicating copy to clipboard operation
remotes copied to clipboard

`remotes::install_github` - `auth_token` should be `NULL`able

Open r-cheologist opened this issue 4 years ago • 4 comments

When installing from various github repos (public and otherwise) in one environment, the automatic fallback of auth_token to the environmental variable becomes problematic. I have the following sequence:

  1. remotes::install_github from private enterprise repo requiring a token;
  2. remotes::install_github from a public repo on github proper.

In this context it should be possible to state auth_token = NULL in the second call, as falling back on the token provided by environmental variable for the first call understandably produces errors ... I'm unable to achieve this.

r-cheologist avatar Mar 25 '20 10:03 r-cheologist

Some background. I agree with what @reikoch mentioned in response, namely that PATs ought to be linked to the corresponding host.

github.com PAT1
github.example.com PAT2
...

I ran into this issue some time ago, when I tried to update_packages("my_package"), where my_package was initially installed from a private GitLab instance. update_packages() looks up the GITLAB_PAT (via package2remote() and gitlab_pat()), which is my gitlab.com and not my gitlab.private.com PAT.

dpprdan avatar May 02 '20 15:05 dpprdan

Just ran into this again - is there any progress regarding this?

r-cheologist avatar Jan 22 '21 08:01 r-cheologist

It is my understanding that this could/might/will be addressed by integrating the credentials 📦, see #516.

dpprdan avatar Jan 23 '21 16:01 dpprdan

Thanks for pointing this out ... I also chimed in at #516.

r-cheologist avatar Jan 24 '21 11:01 r-cheologist