Error: HTTP error 401. Bad credentials

Hi, I am working on a ggmap project in R studio. The ggmap package available on CRAN is outdated. I managed to find the latest package from github. The following are the steps that I took.

  1. Install the package devtools:
  2. Run
    devtools::install_github("dkahle/ggmap", ref = "tidyup")
  3. As I do not have a github account, I did the following:

a. Run usethis::browse_github_pat() in R.
It prompted me a web browser to github page. Login into github using my account. Then click “Generate Token” at the bottom of the page.

b. Copy the token created.

c. Run usethis::edit_r_environ() in R.
A file named “.Renviron” was shown in your RStudio. Type GITHUB_PAT = ‘xxxxx’ in the file, where xxxxx is the token. Save the file.

d. Restart R.

e. Run step 2 again to install the package.

However, I received the error.

`Error: HTTP error 401.
Bad credentials

Rate limit remaining: 49/60
Rate limit reset at: 2019-01-16 05:55:43 UTC`