Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added passphase option for privateKey #4

Merged
merged 1 commit into from
Apr 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added passphase option for privateKey
  • Loading branch information
visoft committed Apr 4, 2020
commit a125ca1c6af281991003b1349554dc486155150a
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ RSA key file. You must upload a public key to the remote server before attemptin

*Default:* `undefined`


### passphrase

For passphrase protected privateKeys.

If you pass this value `privateKey` must be set.

*Default:* `undefined

### agent

Path to ssh-agent's UNIX socket for ssh-agent-based user authentication (when your private keys are loaded into your agent). You must upload a public key to the remote server before attempting to upload any content. Windows users: set to 'pageant' for authenticating with Pageant or (actual) path to a cygwin "UNIX socket."
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ module.exports = {
privateKey: function(context) {
return context.privateKey;
},
passphrase: function(context) {
return context.passphrase;
},
agent: function(context) {
return context.agent;
},
Expand All @@ -51,7 +54,8 @@ module.exports = {
remoteDir: this.readConfig('remoteDir'),
privateKey: this.readConfig('privateKey') && fs.readFileSync(this.readConfig('privateKey')),
agent: this.readConfig('agent'),
password: this.readConfig('password')
password: this.readConfig('password'),
passphrase: this.readConfig('passphrase')
},
sftp = new Sftp(options);

Expand Down