chocolatey / cChoco

Community resource to manage Chocolatey
Apache License 2.0
154 stars 99 forks source link

cChocoSource Authentication #104

Closed Gerthum closed 6 years ago

Gerthum commented 6 years ago

Hi Guys

Is it possible to give me a quick example of who to pass credentials to a repository in cChocoSource? I can't seem to figure it out.

By the way cChoco is a brilliant addition to DSC.

ferventcoder commented 6 years ago

@Gerthum I'm honestly not entirely sure, but it is a MSFT Credential object, so maybe these will help?

Gerthum commented 6 years ago

Hi ferventcoder thank you for the info.

Just an update here I got it to work with the following line in DSC. This is just for Azure DSC have not tried normal DSC as we don't use it.

  1. Create a credential in Azure inside your AutomationAccount
  2. Add this line to your DSC config: $Creds = Get-AutomationPSCredential "CreatedCredential"
  3. Use the above variable in your cchocoSource parameters:

cChocoSource PrivateRepo { Name = 'privaterepo' Source = 'http://privaterepo.com Credentials = $Creds }