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 support for different credential providers #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

renber
Copy link
Contributor

@renber renber commented May 5, 2017

Thanks for this useful tool. I am now using it to deploy my hugo sites automatically :)

As I did not want to store my username and password in the config file I added support for "credential providers" which allow to retrieve credentials from different sources.
For this I added a new property to the config file credentialProvider to allow the user to select a credential provider.
Right now, available providers are:

  • classic: same behavior as before, user and pwd go directly in the config file (when the credentialProvider property is not given, this one is used)
  • interactive: The user is asked to type username and password into the console window (username can be preset using the "old" user value in the config file)
  • pwdfile: The user can declare the property pwdfile in the config and the user and pwd values will be read from there (same folder where the config file is located)
  • wincred: Credentials are retrieved from the Windows Credential Manager by using the identifier given in the config file (wincred-identifier). Naturally, this only works on Windows

Maybe you find this useful enough to merge it. Right now I only tested it on Windows.

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.

1 participant