Skip to content

Commit 65710ad

Browse files
committed
Merge pull request #3 from felixkiss/patch-1
Make privateKeyFile optional - Necessary to completely resolve #1
2 parents 7300565 + d79a97a commit 65710ad

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = {
1515
allowOverwrite: false,
1616
filePattern: 'index.html',
1717
port: 22,
18+
privateKeyFile: null,
1819
agent: null,
1920
passphrase: null,
2021
distDir: function(context) {
@@ -26,7 +27,7 @@ module.exports = {
2627
}
2728
},
2829

29-
requiredConfig: ['username', 'host', 'port', 'remoteDir', 'privateKeyFile'],
30+
requiredConfig: ['username', 'host', 'port', 'remoteDir'],
3031

3132
upload: function(context) {
3233
var allowOverwrite = this.readConfig('allowOverwrite');

lib/ssh.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ module.exports = CoreObject.extend({
131131
port: options.port || '22',
132132
agent: options.agent,
133133
passphrase: options.passphrase,
134-
privateKey: fs.readFileSync(untildify(options.privateKeyFile))
134+
privateKey: options.privateKeyFile ? fs.readFileSync(untildify(options.privateKeyFile)) : null
135135
};
136136

137137
return new Promise(function(resolve, reject) {

0 commit comments

Comments
 (0)