ijlyttle / ghentr

Templating Functions to Use with GitHub Enterprise
https://ijlyttle.github.io/ghentr/
GNU General Public License v3.0
17 stars 3 forks source link

Setting auth_token = NULL in READme #12

Closed pwildenhain closed 6 years ago

pwildenhain commented 6 years ago

Terrific package! Our organization is just starting to embrace R and something like this is definitely the next step for us.

In the READme, the instructions to install are:

devtools::install_github("ijlyttle/ghentr")

However, if you have a GITHUB_PAT in your environment, then R will try to pass your token and this will throw an error: Installation failed: Bad credentials (401)

Since the primary audience for this package are those of us who are already using Github Enterprise, and most of us have already set up a GITHUB_PAT token, can we change the installation instructions to:

devtools::install_github("ijlyttle/ghentr", auth_token = NULL)
cderv commented 6 years ago

Hi, It is strange as I never noticed that. I have a token set in GITHUB_PAT (checked with gh::gh_whoami()) and I can install using devtools::install_github("ijlyttle/ghentr"). The GITHUB_PAT should not prevent getting a public repo. Out of curiosity, some question to understand:

In all case, I am curious to understand the issue.

pwildenhain commented 6 years ago

Is it a github.com token or a Github Entreprise Token ? Normally, GHE token should be put in an env variable with a different name. ghentr help for that

This might be our problem. It's an enterprise token. Should we create new enterprise tokens using ghentr?

ijlyttle commented 6 years ago

Thanks @cderv for jumping in - I think you are getting at the heart of the issue.

@pwildenhain Thanks for your kind words, let me see if I can bounce off of Christophe's advice:

Hope this helps!

pwildenhain commented 6 years ago

Thanks for clearing this up!