grunt-deploy-keys

0.2.0 • Public • Published

grunt-deploy-keys

Automatically parses package.json and sets ~/.ssh/id_rsa.pub as deploy key for all private bitbucket repositories using Bitbucket API

If id_rsa.pub is not present it runs ssh-keygen to generate one.

Requirements

  1. It will ask you for login/password to access those private repos so you have to have at least read permission for all of them

Getting Started

This plugin requires Grunt ~0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-deploy-keys --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-deploy-keys');

The "deployKeys" task

Overview

In your project's Gruntfile, add a section named deployKeys to the data object passed into grunt.initConfig().

grunt.initConfig({
  deployKeys: {
    bitbucket: {
      options: {
        sshKeyPath: '~/.ssh/id_rsa.pub'
        host: 'ubuntu@192.168.1.1'
      }
    },
  },
});

Options

options.host

Type: String

Default value: undefined

If present will connect to remote host via SSH to grab the key.

options.sshKeyPath

Type: String

Default value: '~/.ssh/id_rsa.pub'

Path to the public SSH key

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)

/grunt-deploy-keys/

    Package Sidebar

    Install

    npm i grunt-deploy-keys

    Weekly Downloads

    6

    Version

    0.2.0

    License

    none

    Last publish

    Collaborators

    • cray0000