Skip to content

Commit 01b2a19

Browse files
author
liuyt
committed
调试travis
1 parent a8ea2f6 commit 01b2a19

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

.travis.yml

-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
language: node_js
22
os:
33
- linux
4-
- osx
54
node_js:
6-
- "9"
7-
- "8"
8-
- "7"
95
- "6"
106
sudo: false
117
cache:

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@
4343
2:Create a new ssh key and copy new ssh key to remote host
4444
3:Create a new ssh key and copy new ssh key to remote host and set ssh key config
4545

46-
-H --host [value] Remote host address and username
46+
-H --host [value] Remote host address, you can include the usename and port, E.g: [email protected]:22
47+
-u --user [value] Remote host of username, default root
48+
-p --port [value] Remote host of port, default 22
49+
-N --new_passphrase [value] Generate ssh key's new_passphrase
4750
-h, --help output usage information
4851

52+
4953
Basic Examples:
5054

5155
# Initialize SSH keys store
@@ -64,7 +68,7 @@
6468
$ nssh create github.com -t 1 -H [email protected]
6569

6670
# Create a new ssh key and copy public key to a remote host
67-
$ nssh create node1 -t 2 -H [email protected] -u root
71+
$ nssh create node1 -t 2 -H [email protected]
6872

6973
# Create a new ssh key and set its config and copy public key to a remote host
7074
$ nssh create node1 -t 3 -H [email protected]

bin/nssh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ program.version(pkg.version)
1515
.option('-H --host [value]', 'Remote host address, you can include the usename and port, E.g: [email protected]:22')
1616
.option('-u --user [value]', 'Remote host of username, default root')
1717
.option('-p --port [value]', "Remote host of port, default 22", parseInt)
18-
.option('-N --new_passphrase [value]', "Generate ssh key's new_passphrase,default empty")
18+
.option('-N --new_passphrase [value]', "Generate ssh key's new_passphrase")
1919

2020
.usage('<command> [options]')
2121

test/test.util.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function spawn(cmd, options, handle, callback) {
2121
let content = [];
2222
term.on('data', function (data) {
2323
content.push(data);
24-
// console.log(data);
24+
console.log(data);
2525
if (handle && typeof handle === 'function') {
2626
handle(term, data, content)
2727
}

test/utils.test.js

+5
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@ describe('Utils testing:', function () {
236236
assert.equal(obj.port, '50001');
237237
})
238238

239+
it('string is empty', function () {
240+
let obj = utils.getHost()
241+
assert.equal(obj, false);
242+
})
243+
239244
it('cover host', function () {
240245
let cover = {
241246
user: 'root',

0 commit comments

Comments
 (0)