chocolatey / chocolatey/ChocolateyGUI
Error when (accidentally) removing credentials for an authenticated source (ChocolateyGUI - Bug When Setting Chocolatey.licensed Source to Admin Only)
- Dominant language
- C#
- Stars
- 1.8k
- Forks
- 271
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 1
Description
## Description
Chocolatey GUI as well as CLI experience errors when setting the chocolatey.licensed source to admin only.
## Issue Repro
Run `choco source add -n=chocolatey.licensed -s=https://licensedpackages.chocolatey.org\api\v2\ --adminonly`
The run `choco source list`
## Explanation
When running this command no error immediately shows within Chocolatey however if you run `choco source list` you will get the following error message: Value cannot be null Value = s
Looking further into this within the chocolatey.config file you see that the source no longer has the username and password associated to it via the license file.
When trying to open Chocolatey GUI it will not open but display an Unhandled Exception error upon startup.
Looking into a working ChocolateyGUI sessions source settings the GUI displays a warning on the licensed feed and does not allow setting this to an admin only source.
## Other Information
* Chocolatey Version - 0.10.15
* Chocolatey.Extension Version - 2.1.0
* Chocolatey GUI Version - 0.17.3
## References
* [GitLab Issue](https://gitlab.com/chocolatey/collaborators/choco-licensed/-/issues/368)
* [ZenDesk Ticket](https://chocolatey.zendesk.com/agent/tickets/9280)
Contributor guide
Research direction
Start by reproducing the issue with the shown `choco source add` command, then run `choco source list` and open Chocolatey GUI to trace the failure in the licensed-source handling. Done means an admin-only authenticated source no longer loses its credentials, `choco source list` does not error, and Chocolatey GUI starts without an unhandled exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100