hugodeploy
hugodeploy copied to clipboard
Added support for different credential providers
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.