IntelliTect / PSToolbox

PowerShell scripts and modules on PowerShell gallery
https://www.powershellgallery.com/packages?q=Intellitect
MIT License
9 stars 4 forks source link

Publish.ps1 should have a default value for APIKey so that it doesn't require the user to enter it every time. #14

Closed MarkMichaelis closed 8 years ago

adamskt commented 8 years ago

I would strongly argue against this. Providing a default value would mean checking in the API key into publicly-visible code, which means anyone could impersonate IntelliTect on PS Gallery. Is there a way to cache a simple string in the Windows Credential Store, so that a publisher will only be prompted once in a session?

MarkMichaelis commented 8 years ago

Certainly... didn't even occur to me to do otherwise. I was assuming the default value was pulled from another source like Credential Store as you suggested.... not something we would hard code. Andrew believes he saw something like this as part of PowerShell Gallery but if not, we will use the credential store or some local machine mechanism.

ascott18 commented 8 years ago

Added integration with IntelliTect.CredentialManager if it is installed/imported in eaca2b7. Add the API key using Set-CredentialManagerCredential psgallery (make the username whatever you want; it isn't used)