unable to install packages from GitHub

Error Information: Error in loadNamespace(x) : there is no package called ‘PubmedMTK’

Using github PAT from envvar GITHUB_PAT
Error: Failed to install 'unknown package' from GitHub:
HTTP error 401.
Bad credentials

Rate limit remaining: 59/60
Rate limit reset at: 2021-12-16 06:13:31 UTC

Description of issue - I cannot install packages from GitHub. using the above code.
I have tried various syntax including 'remotes' but still have the problem
I have no problem with packages that are listed in the CRAN directory

Steps taken so far - getting annoyed - I contacted GitHub but they were bamboozled! They couldn't understand why my system wants to use the PAT authorisation.

System Information:

  • RStudio Edition: (Desktop or Server) Desktop
  • RStudio Version: Version 1.4.1717
  • OS Version: MacOS Monterey 12.1
  • R Version: > version
    platform x86_64-apple-darwin17.0
    arch x86_64
    os darwin17.0
    system x86_64, darwin17.0
    major 4
    minor 1.1
    year 2021
    month 08
    day 10
    svn rev 80725
    language R
    version.string R version 4.1.1 (2021-08-10)
    nickname Kick Things


  • RStudio diagnostics report:
  • Your sessionInfo():
  • RStudio crash report:
  • RStudio application log files:

From Troubleshooting Guide: Using RStudio

This arises from an obscure feature in devtools. Check to see if you have a personal access token (PAT) set with


If you do, make a careful record of it, then remove from the environment with


Thank you for the reply (sorry for the delay,I had some problems with internet service). I have followed your steps and I am happy to report that it worked.
Thank you once again

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.