git-ssh

0.0.1 • Public • Published

Git SSH Helper

Helper to manage SSH key for git

Installation

npm install git-ssh or npm install -g git-ssh

Methods

function create(email)     Use ssh-keygen tool to generate private/public key files for rsa format 
function import(path)      Import the private/public key files generated by user, then you use other commands
function where()           Display the location of private key file
function init()            Add the generated private key to the authentication agent, then you can use git to
                                connect to git repo by using ssh protocal
function quit()            Kill the ssh agent process

Example

var git_ssh = require('git-ssh');
git_ssh.create('username@sina.com');
git_ssh.import('C:\\dir\\id_rsa');
console.log('The location of ssh key file: ' + git_ssh.where());
git_ssh.init();
git_ssh.quit();

Readme

Keywords

none

Package Sidebar

Install

npm i git-ssh

Weekly Downloads

3

Version

0.0.1

License

BSD

Last publish

Collaborators

  • chenxy