From 8d2d6e12ed48a8d999790c53228e618c279959f8 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Wed, 17 Jun 2020 16:25:49 -0500 Subject: [PATCH] add notes about authenticating to Github package manager --- CONTRIBUTING.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d2fb4d76..78bf0e2e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,6 +39,27 @@ You will need [Git][git] to get the source code from GitHub. (Say that 3 times f [git]: https://git-scm.com/ +## Github Packages + +We are currently depending on a couple of packages from the Github package +registry. This requires you to log in first before you can install the packages. + +To do this, first you will need to create a new authentication token at +. + +- Click the *Generate a new token* button. +- Select the **repo** and **read:packages** scopes. +- Click the *Generate token* button. +- Click the clipboard icon top copy the token to be used below. + +Then run the following command and enter your username, authentication token +and email: + + npm login --registry=https://npm.pkg.github.com + +This only needs to be done once. + + ## Getting The Code After the tools above have been installed, open a command prompt in the directory @@ -48,6 +69,8 @@ where you would like to save the source code and run: cd pybricks-code yarn install +If you see a 401 not authorized error after running `yarn install`, then you +probably skipped the logging into the Github package registry as described above. # Software Stack