chocolatey-community / simple-server

The Chocolatey Simple Server - https://community.chocolatey.org/packages/chocolatey.server
Apache License 2.0
44 stars 17 forks source link

Provide instructions on changing apikey versus what setapikey does #25

Closed pravincarvalho closed 6 years ago

pravincarvalho commented 6 years ago

version: 0.2.2 I've used the following command to set the api key on my chocolatey server. I've run this command from an administrative powershell on the same machine.

choco setapikey --source="http://<<myserver>>/chocolatey" --api-key=oYyDQXtsNQjPMUUUMtkE3YhJ

which returns

Updated ApiKey for http://<<my server>>/chocolatey

However, when I try pushing a package I get a 403 forbidden error and if I try pushing a package with the default "chocolateyrocks" API key, the package is uploaded successfully.

ferventcoder commented 6 years ago

Hi @pravincarvalho choco setapikey is for you to set your LOCAL choco client to the existing API key on the server. To change the key on the server, you have to manually edit the web.config file.

Perhaps it would be good for us to draw that out in the instructions.

NOTE: If that was your actual apikey, you might change it.

ferventcoder commented 6 years ago

@Bcurran3 fyi

bcurran3 commented 6 years ago

Don't forget to put in the docs viewing Chocolatey Simple Server with Internet Explorer or Firefox versus Chrome. Set expectations and head off the support questions. :) (I'd love to find a Chrome "fix" to view the feed correctly - I'm sure there's an extension....)

pravincarvalho commented 6 years ago

@ferventcoder Thanks for the explanation! On the landing page, you could just modify the line

You can set the ApiKey for this repository with 
choco.exe push [{package file}] --source http://<<my server>>/chocolatey [--api-key={apikey}]

to say something like

You can set the ApiKey for your choco client to connect to this repository with
choco.exe push [{package file}] --source http://<<my server>>/chocolatey [--api-key={apikey}]

and that should make it clear.

ferventcoder commented 6 years ago

This is completed for 0.2.3