Code Monkey home page Code Monkey logo

eb-authenticate-npm's Introduction

eb-authenticate-npm

This module installs an .ebextensions config file that will authenticate your Elastic Beanstalk environments to npm.

The config file will do this by creating an .npmrc that reads the value of the NPM_TOKEN environment variable. This .npmrc file will only be created in EB, letting you use whatever authentication strategy you like locally. (The alternative.)

By the way I was really hoping that EB would automatically read NPM_TOKEN as per this Stack Overflow answer but that didn't work for me (tested 8/3/2016).

Installation

  1. npm install eb-authenticate-npm --save-dev (see here for why --save-dev)
  2. Commit the .ebextensions file it creates.
  3. Set the NPM_TOKEN EB environment variable to an npm authentication token.
  4. Deploy.

Modifying the .ebextensions file

This module will overwrite the file if/when it is updated.

Pull requests are welcome if you have some generally-useful modifications to suggest.

If you'd like to make modifications specific to your use case, you should uninstall this module after installing the .ebextensions file. Uninstallation won't take the file with it.

Thanks/Prior art

Thanks to Remy Sharp for suggesting this strategy, and this Stack Overflow answer for helping me figure out where the .npmrc needed to be written.

eb-authenticate-npm's People

Contributors

wearhere avatar gaastonsr avatar spencer-brown avatar megantinleywilson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.