Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 897 Bytes

README.md

File metadata and controls

25 lines (20 loc) · 897 Bytes

#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();