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

Add support for using env variables instead of .ftppass #47

Merged
merged 1 commit into from
Jul 23, 2014

Conversation

Androguide
Copy link
Contributor

This commit adds support for declaring the authentication parameters as environement variables instead of inside the .ftppass file.
Passing the variable name in the grunt task's authKey parameter or the .ftppass configuration is seamless.

Example:

~/.bashrc (or equivalent)

export GRUNT_SFTP="{
                      \"username\": \"your-username\",
                      \"keyLocation\": \"/path/to/your/key\",
                      \"password\": \"your-strong-password\"
                   }"

Gruntfile.js

"sftp-deploy": {
    build: {
       auth: {
           host: 'my-ftp.com',
           port: '5678',
           authKey: 'GRUNT_SFTP'
       }
      ...
    }
}

This commit adds support for declaring the authentication parameters as environement variables instead of inside the .ftppass file.
Passing the variable name in the grunt task's `authKey` parameter or the `.ftppass` configuration is seamless.

Example:

**~/.bashrc** (or equivalent)
```
export GRUNT_SFTP="{
                      \"username\": \"your-username\",
                      \"keyLocation\": \"/home/louis/.ssh/izi_rsa\"
                   }"
```

**Gruntfile.js**
"sftp-deploy": {
    build: {
       auth: {
           host: 'my-ftp.com',
           port: '5678',
           authKey: 'GRUNT_SFTP'
       }
      ...
    }
}
@Androguide Androguide mentioned this pull request Jul 22, 2014
thrashr888 added a commit that referenced this pull request Jul 23, 2014
Add support for using env variables instead of .ftppass
@thrashr888 thrashr888 merged commit 607adab into thrashr888:master Jul 23, 2014
@thrashr888
Copy link
Owner

I like it. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants