Using private GitHub repositories with yarn and npm in package.json

Whether you are working on a JavaScript project or a Rails one with Webpack you might come to the point where you need to reference a private GitHub repository as your dependency in package.json. Here are two options on how to do that.