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

How to use inline credentials instead of .ftppass #111

Open
TanKucukhas opened this issue Feb 22, 2016 · 5 comments
Open

How to use inline credentials instead of .ftppass #111

TanKucukhas opened this issue Feb 22, 2016 · 5 comments

Comments

@TanKucukhas
Copy link

Documentation says

Usernames and passwords can be stored in an optional JSON file (.ftppass in the project folder or optionaly defined inauthPath).

But does not mention anything about to be able to use inline credentials, is there a way I could do that?

This does not seems to work still asks password on the console

auth: {
                    host: '<%= settings.user.ftpHost %>',
                    port: '<%= settings.user.ftpPort %>',
                    authKey: {
                            "username": "username",
                            "password": "password"
                    }
                }
@TanKucukhas TanKucukhas changed the title How to use authPath instead of .ftppass How to use inline credentials instead of .ftppass Feb 22, 2016
@zonak
Copy link
Owner

zonak commented Feb 23, 2016

The idea is to have a way to store them in a file that you can exclude from version control or provide them as parameters when you are executing the task. The file doesn't go through any tempting so ... no, you cannot use it as in the example.

@TanKucukhas
Copy link
Author

I understand it has to be in a separate file for exclusion purposes but in my case I have a global credentials file that includes other passwords like SMTP and I just don't want to .ftppass sitting there alone only for ftp configuration.

So instead of .ftppass I was using a global file that has all of the passwords called .creds. but this is not working for ftp-deploy.

{
  "ftp": {
    "username": "ftp-user",
    "password": "ftp-password"
  },
  "gmail": {
    "type": "SMTP",
    "username": "[email protected]",
    "password": "userpass"
  }
}

@TanKucukhas
Copy link
Author

May be use a more global name for the .ftppass file like .credentials or .pass? That way I could put my other passwords as well and I don't have to have separate passwords for each plugin.

@julkue
Copy link

julkue commented Mar 6, 2016

@TanKucukhas have a look at the way it is implemented in jmBoilerplate. The .ftppass file will be generated by arguments from the console.

@zonak
Copy link
Owner

zonak commented Mar 7, 2016

@julmot's approach is one way to go. Also the task has the ability to accept parameters from cli as well.
Please understand that satisfying everyone's custom use cases is going to make maintenance much harder than it has to be.

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

No branches or pull requests

3 participants