Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chocolatey CLI v2.x (running on Windows 7) is not able to communicate with Chocolatey Community Repository due to TLS issue #3250

Closed
4 tasks done
superbonaci opened this issue Jul 3, 2023 · 15 comments

Comments

@superbonaci
Copy link

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem.
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.

What You Are Seeing?

Install chocolatey:

PS C:\Users\tom\Desktop> Set-ExecutionPolicy Bypass -Scope Process -Force; [System
.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::
SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadStrin
g('https://community.chocolatey.org/install.ps1'))
Forcing web requests to allow TLS v1.2 (Required for requests to Chocolatey.org)

Getting latest version of the Chocolatey package for download.
Not using proxy.
Getting Chocolatey from https://community.chocolatey.org/api/v2/package/chocolat
ey/2.1.0.
Downloading https://community.chocolatey.org/api/v2/package/chocolatey/2.1.0 to
C:\Users\tom\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip
Not using proxy.
Extracting C:\Users\tom\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip
to C:\Users\tom\AppData\Local\Temp\chocolatey\chocoInstall
Installing Chocolatey on the local machine
Creating ChocolateyInstall as an environment variable (targeting 'Machine')
  Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
WARNING: It's very likely you will need to close and reopen your shell
  before you can use choco.
Restricting write permissions to Administrators
We are setting up the Chocolatey package repository.
The packages themselves go to 'C:\ProgramData\chocolatey\lib'
  (i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
  and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'
.

Creating Chocolatey folders if they do not already exist.

chocolatey.nupkg file not installed in lib.
 Attempting to locate it from bootstrapper.
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
 first prior to using choco.
Ensuring Chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder
PS C:\Users\tom\Desktop>

What is Expected?

Work.

How Did You Get This To Happen?

Install chocolatey and try to install any package.

System Details

  • Operating System: 6.1.7601.0
  • Windows PowerShell version: 7.2.8
  • Chocolatey CLI Version: 2.1.0
  • Chocolatey Licensed Extension version: no
  • Chocolatey License type: no
  • Terminal/Emulator: PowerShell

Installed Packages

choco list
Chocolatey v2.1.0
1 packages installed

Output Log

2023-07-03 10:01:51,242 7140 [DEBUG] - XmlConfiguration is now operational
2023-07-03 10:01:51,636 7140 [DEBUG] - Adding new type 'CygwinService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2023-07-03 10:01:51,636 7140 [DEBUG] - Adding new type 'CygwinService' for type 'IInstallSourceRunner' from assembly 'choco'
2023-07-03 10:01:51,636 7140 [DEBUG] - Adding new type 'PythonService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2023-07-03 10:01:51,636 7140 [DEBUG] - Adding new type 'PythonService' for type 'IListSourceRunner' from assembly 'choco'
2023-07-03 10:01:51,646 7140 [DEBUG] - Adding new type 'PythonService' for type 'IInstallSourceRunner' from assembly 'choco'
2023-07-03 10:01:51,646 7140 [DEBUG] - Adding new type 'PythonService' for type 'IUninstallSourceRunner' from assembly 'choco'
2023-07-03 10:01:51,646 7140 [DEBUG] - Adding new type 'RubyGemsService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2023-07-03 10:01:51,656 7140 [DEBUG] - Adding new type 'RubyGemsService' for type 'IListSourceRunner' from assembly 'choco'
2023-07-03 10:01:51,656 7140 [DEBUG] - Adding new type 'RubyGemsService' for type 'IInstallSourceRunner' from assembly 'choco'
2023-07-03 10:01:51,666 7140 [DEBUG] - Adding new type 'SystemStateValidation' for type 'IValidation' from assembly 'choco'
2023-07-03 10:01:57,191 7140 [DEBUG] - Adding new type 'EmptyOrInvalidUrlMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:01:57,191 7140 [DEBUG] - Adding new type 'FrameWorkReferencesMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:01:57,201 7140 [DEBUG] - Adding new type 'IconMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:01:57,201 7140 [DEBUG] - Adding new type 'LicenseMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:01:57,201 7140 [DEBUG] - Adding new type 'PackageTypesMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:01:57,211 7140 [DEBUG] - Adding new type 'ReadmeMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:01:57,211 7140 [DEBUG] - Adding new type 'RepositoryMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:01:57,211 7140 [DEBUG] - Adding new type 'RequireLicenseAcceptanceMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:01:57,211 7140 [DEBUG] - Adding new type 'ServicableMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:01:57,221 7140 [DEBUG] - Adding new type 'VersionMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:01:57,271 7140 [DEBUG] - Registering new command 'cache' in assembly 'choco'
2023-07-03 10:01:57,271 7140 [DEBUG] - Registering new command 'list' in assembly 'choco'
2023-07-03 10:01:57,281 7140 [DEBUG] - Registering new command 'template' in assembly 'choco'
2023-07-03 10:01:57,281 7140 [DEBUG] - Registering new command 'export' in assembly 'choco'
2023-07-03 10:01:57,281 7140 [DEBUG] - Registering new command 'info' in assembly 'choco'
2023-07-03 10:01:57,291 7140 [DEBUG] - Registering new command 'help' in assembly 'choco'
2023-07-03 10:01:57,291 7140 [DEBUG] - Registering new command 'config' in assembly 'choco'
2023-07-03 10:01:57,291 7140 [DEBUG] - Registering new command 'feature' in assembly 'choco'
2023-07-03 10:01:57,291 7140 [DEBUG] - Registering new command 'new' in assembly 'choco'
2023-07-03 10:01:57,301 7140 [DEBUG] - Registering new command 'outdated' in assembly 'choco'
2023-07-03 10:01:57,301 7140 [DEBUG] - Registering new command 'pack' in assembly 'choco'
2023-07-03 10:01:57,311 7140 [DEBUG] - Registering new command 'pin' in assembly 'choco'
2023-07-03 10:01:57,311 7140 [DEBUG] - Registering new command 'push' in assembly 'choco'
2023-07-03 10:01:57,311 7140 [DEBUG] - Registering new command 'apikey' in assembly 'choco'
2023-07-03 10:01:57,321 7140 [DEBUG] - Registering new command 'source' in assembly 'choco'
2023-07-03 10:01:57,321 7140 [DEBUG] - Registering new command 'uninstall' in assembly 'choco'
2023-07-03 10:01:57,321 7140 [DEBUG] - Registering new command 'upgrade' in assembly 'choco'
2023-07-03 10:01:57,331 7140 [DEBUG] - Registering new command 'search' in assembly 'choco'
2023-07-03 10:01:57,331 7140 [DEBUG] - Registering new command 'unpackself' in assembly 'choco'
2023-07-03 10:01:57,331 7140 [DEBUG] - Registering new command 'install' in assembly 'choco'
2023-07-03 10:01:57,411 7140 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\config".
2023-07-03 10:01:58,222 7140 [INFO ] - ============================================================
2023-07-03 10:01:59,179 7140 [DEBUG] - Attempting to replace "C:\ProgramData\chocolatey\config\chocolatey.config"
 with "C:\ProgramData\chocolatey\config\chocolatey.config.7140.update".
 Backup placed at "C:\ProgramData\chocolatey\config\chocolatey.config.backup".
2023-07-03 10:01:59,199 7140 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\config\chocolatey.config.7140.update"
 to "C:\ProgramData\chocolatey\config\chocolatey.config".
2023-07-03 10:01:59,209 7140 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\config\chocolatey.config.7140.update".
2023-07-03 10:01:59,219 7140 [INFO ] - 2.1.0
2023-07-03 10:01:59,239 7140 [DEBUG] - Exiting with 0
2023-07-03 10:04:24,389 8012 [DEBUG] - XmlConfiguration is now operational
2023-07-03 10:04:24,691 8012 [DEBUG] - Adding new type 'CygwinService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2023-07-03 10:04:24,691 8012 [DEBUG] - Adding new type 'CygwinService' for type 'IInstallSourceRunner' from assembly 'choco'
2023-07-03 10:04:24,691 8012 [DEBUG] - Adding new type 'PythonService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2023-07-03 10:04:24,701 8012 [DEBUG] - Adding new type 'PythonService' for type 'IListSourceRunner' from assembly 'choco'
2023-07-03 10:04:24,701 8012 [DEBUG] - Adding new type 'PythonService' for type 'IInstallSourceRunner' from assembly 'choco'
2023-07-03 10:04:24,701 8012 [DEBUG] - Adding new type 'PythonService' for type 'IUninstallSourceRunner' from assembly 'choco'
2023-07-03 10:04:24,711 8012 [DEBUG] - Adding new type 'RubyGemsService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2023-07-03 10:04:24,711 8012 [DEBUG] - Adding new type 'RubyGemsService' for type 'IListSourceRunner' from assembly 'choco'
2023-07-03 10:04:24,711 8012 [DEBUG] - Adding new type 'RubyGemsService' for type 'IInstallSourceRunner' from assembly 'choco'
2023-07-03 10:04:24,721 8012 [DEBUG] - Adding new type 'SystemStateValidation' for type 'IValidation' from assembly 'choco'
2023-07-03 10:04:29,177 8012 [DEBUG] - Adding new type 'EmptyOrInvalidUrlMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:04:29,177 8012 [DEBUG] - Adding new type 'FrameWorkReferencesMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:04:29,177 8012 [DEBUG] - Adding new type 'IconMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:04:29,187 8012 [DEBUG] - Adding new type 'LicenseMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:04:29,187 8012 [DEBUG] - Adding new type 'PackageTypesMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:04:29,197 8012 [DEBUG] - Adding new type 'ReadmeMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:04:29,197 8012 [DEBUG] - Adding new type 'RepositoryMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:04:29,197 8012 [DEBUG] - Adding new type 'RequireLicenseAcceptanceMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:04:29,207 8012 [DEBUG] - Adding new type 'ServicableMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:04:29,207 8012 [DEBUG] - Adding new type 'VersionMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:04:29,247 8012 [DEBUG] - Registering new command 'cache' in assembly 'choco'
2023-07-03 10:04:29,247 8012 [DEBUG] - Registering new command 'list' in assembly 'choco'
2023-07-03 10:04:29,257 8012 [DEBUG] - Registering new command 'template' in assembly 'choco'
2023-07-03 10:04:29,257 8012 [DEBUG] - Registering new command 'export' in assembly 'choco'
2023-07-03 10:04:29,257 8012 [DEBUG] - Registering new command 'info' in assembly 'choco'
2023-07-03 10:04:29,267 8012 [DEBUG] - Registering new command 'help' in assembly 'choco'
2023-07-03 10:04:29,267 8012 [DEBUG] - Registering new command 'config' in assembly 'choco'
2023-07-03 10:04:29,267 8012 [DEBUG] - Registering new command 'feature' in assembly 'choco'
2023-07-03 10:04:29,267 8012 [DEBUG] - Registering new command 'new' in assembly 'choco'
2023-07-03 10:04:29,277 8012 [DEBUG] - Registering new command 'outdated' in assembly 'choco'
2023-07-03 10:04:29,277 8012 [DEBUG] - Registering new command 'pack' in assembly 'choco'
2023-07-03 10:04:29,277 8012 [DEBUG] - Registering new command 'pin' in assembly 'choco'
2023-07-03 10:04:29,287 8012 [DEBUG] - Registering new command 'push' in assembly 'choco'
2023-07-03 10:04:29,287 8012 [DEBUG] - Registering new command 'apikey' in assembly 'choco'
2023-07-03 10:04:29,287 8012 [DEBUG] - Registering new command 'source' in assembly 'choco'
2023-07-03 10:04:29,297 8012 [DEBUG] - Registering new command 'uninstall' in assembly 'choco'
2023-07-03 10:04:29,297 8012 [DEBUG] - Registering new command 'upgrade' in assembly 'choco'
2023-07-03 10:04:29,297 8012 [DEBUG] - Registering new command 'search' in assembly 'choco'
2023-07-03 10:04:29,297 8012 [DEBUG] - Registering new command 'unpackself' in assembly 'choco'
2023-07-03 10:04:29,307 8012 [DEBUG] - Registering new command 'install' in assembly 'choco'
2023-07-03 10:04:29,849 8012 [INFO ] - ============================================================
2023-07-03 10:04:30,669 8012 [INFO ] - Chocolatey v2.1.0
2023-07-03 10:04:30,797 8012 [DEBUG] - Chocolatey is running on Windows v 6.1.7601.65536
2023-07-03 10:04:30,876 8012 [DEBUG] - Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
2023-07-03 10:04:30,917 8012 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
2023-07-03 10:04:31,057 8012 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" --debug --verbose install chocolateygui
2023-07-03 10:04:31,193 8012 [DEBUG] - Received arguments: --debug --verbose install chocolateygui
2023-07-03 10:04:31,519 8012 [DEBUG] - RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
2023-07-03 10:04:31,589 8012 [DEBUG] - Sending message 'PreRunMessage' out if there are subscribers...
2023-07-03 10:04:31,669 8012 [DEBUG] - [Pending] Removing all pending packages that should not be considered installed...
2023-07-03 10:04:32,195 8012 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
2023-07-03 10:04:32,275 8012 [DEBUG] - Exiting with 1
2023-07-03 10:05:18,573 736 [DEBUG] - XmlConfiguration is now operational
2023-07-03 10:05:18,793 736 [DEBUG] - Adding new type 'CygwinService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2023-07-03 10:05:18,793 736 [DEBUG] - Adding new type 'CygwinService' for type 'IInstallSourceRunner' from assembly 'choco'
2023-07-03 10:05:18,793 736 [DEBUG] - Adding new type 'PythonService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2023-07-03 10:05:18,803 736 [DEBUG] - Adding new type 'PythonService' for type 'IListSourceRunner' from assembly 'choco'
2023-07-03 10:05:18,803 736 [DEBUG] - Adding new type 'PythonService' for type 'IInstallSourceRunner' from assembly 'choco'
2023-07-03 10:05:18,803 736 [DEBUG] - Adding new type 'PythonService' for type 'IUninstallSourceRunner' from assembly 'choco'
2023-07-03 10:05:18,803 736 [DEBUG] - Adding new type 'RubyGemsService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2023-07-03 10:05:18,813 736 [DEBUG] - Adding new type 'RubyGemsService' for type 'IListSourceRunner' from assembly 'choco'
2023-07-03 10:05:18,813 736 [DEBUG] - Adding new type 'RubyGemsService' for type 'IInstallSourceRunner' from assembly 'choco'
2023-07-03 10:05:18,823 736 [DEBUG] - Adding new type 'SystemStateValidation' for type 'IValidation' from assembly 'choco'
2023-07-03 10:05:23,411 736 [DEBUG] - Adding new type 'EmptyOrInvalidUrlMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:05:23,416 736 [DEBUG] - Adding new type 'FrameWorkReferencesMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:05:23,420 736 [DEBUG] - Adding new type 'IconMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:05:23,424 736 [DEBUG] - Adding new type 'LicenseMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:05:23,427 736 [DEBUG] - Adding new type 'PackageTypesMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:05:23,431 736 [DEBUG] - Adding new type 'ReadmeMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:05:23,435 736 [DEBUG] - Adding new type 'RepositoryMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:05:23,440 736 [DEBUG] - Adding new type 'RequireLicenseAcceptanceMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:05:23,444 736 [DEBUG] - Adding new type 'ServicableMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:05:23,449 736 [DEBUG] - Adding new type 'VersionMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2023-07-03 10:05:23,502 736 [DEBUG] - Registering new command 'cache' in assembly 'choco'
2023-07-03 10:05:23,502 736 [DEBUG] - Registering new command 'list' in assembly 'choco'
2023-07-03 10:05:23,502 736 [DEBUG] - Registering new command 'template' in assembly 'choco'
2023-07-03 10:05:23,512 736 [DEBUG] - Registering new command 'export' in assembly 'choco'
2023-07-03 10:05:23,512 736 [DEBUG] - Registering new command 'info' in assembly 'choco'
2023-07-03 10:05:23,512 736 [DEBUG] - Registering new command 'help' in assembly 'choco'
2023-07-03 10:05:23,522 736 [DEBUG] - Registering new command 'config' in assembly 'choco'
2023-07-03 10:05:23,522 736 [DEBUG] - Registering new command 'feature' in assembly 'choco'
2023-07-03 10:05:23,522 736 [DEBUG] - Registering new command 'new' in assembly 'choco'
2023-07-03 10:05:23,522 736 [DEBUG] - Registering new command 'outdated' in assembly 'choco'
2023-07-03 10:05:23,532 736 [DEBUG] - Registering new command 'pack' in assembly 'choco'
2023-07-03 10:05:23,532 736 [DEBUG] - Registering new command 'pin' in assembly 'choco'
2023-07-03 10:05:23,532 736 [DEBUG] - Registering new command 'push' in assembly 'choco'
2023-07-03 10:05:23,542 736 [DEBUG] - Registering new command 'apikey' in assembly 'choco'
2023-07-03 10:05:23,542 736 [DEBUG] - Registering new command 'source' in assembly 'choco'
2023-07-03 10:05:23,542 736 [DEBUG] - Registering new command 'uninstall' in assembly 'choco'
2023-07-03 10:05:23,552 736 [DEBUG] - Registering new command 'upgrade' in assembly 'choco'
2023-07-03 10:05:23,552 736 [DEBUG] - Registering new command 'search' in assembly 'choco'
2023-07-03 10:05:23,552 736 [DEBUG] - Registering new command 'unpackself' in assembly 'choco'
2023-07-03 10:05:23,562 736 [DEBUG] - Registering new command 'install' in assembly 'choco'
2023-07-03 10:05:24,022 736 [INFO ] - ============================================================
2023-07-03 10:05:24,686 736 [INFO ] - Chocolatey v2.1.0
2023-07-03 10:05:24,786 736 [DEBUG] - Chocolatey is running on Windows v 6.1.7601.65536
2023-07-03 10:05:24,821 736 [DEBUG] - Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
2023-07-03 10:05:24,938 736 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
2023-07-03 10:05:25,039 736 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" install --debug --verbose chocolateygui
2023-07-03 10:05:25,080 736 [DEBUG] - Received arguments: install --debug --verbose chocolateygui
2023-07-03 10:05:25,458 736 [DEBUG] - RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
2023-07-03 10:05:25,541 736 [DEBUG] - Sending message 'PreRunMessage' out if there are subscribers...
2023-07-03 10:05:25,654 736 [DEBUG] - [Pending] Removing all pending packages that should not be considered installed...
2023-07-03 10:05:25,986 736 [DEBUG] - Performing validation checks.
2023-07-03 10:05:26,032 736 [DEBUG] - Global Configuration Validation Checks:
2023-07-03 10:05:26,070 736 [DEBUG] -  - Package Exit Code / Exit On Reboot = Checked
2023-07-03 10:05:26,116 736 [DEBUG] - System State Validation Checks:
2023-07-03 10:05:26,176 736 [DEBUG] -  Reboot Requirement Checks:
2023-07-03 10:05:26,221 736 [DEBUG] -  - Pending Computer Rename = Checked
2023-07-03 10:05:26,263 736 [DEBUG] -  - Pending Component Based Servicing = Checked
2023-07-03 10:05:26,323 736 [DEBUG] -  - Pending Windows Auto Update = Checked
2023-07-03 10:05:26,349 736 [DEBUG] -  - Pending File Rename Operations = Checked
2023-07-03 10:05:26,436 736 [DEBUG] -  - Pending Windows Package Installer = Checked
2023-07-03 10:05:26,474 736 [DEBUG] -  - Pending Windows Package Installer SysWow64 = Checked
2023-07-03 10:05:26,583 736 [INFO ] - 2 validations performed. 2 success(es), 0 warning(s), and 0 error(s).
2023-07-03 10:05:26,678 736 [DEBUG] - The source 'https://community.chocolatey.org/api/v2/' evaluated to a 'normal' source type
2023-07-03 10:05:26,892 736 [DEBUG] - 
NOTE: Hiding sensitive configuration data! Please double and triple
 check to be sure no sensitive data is shown, especially if copying
 output to a gist for review.
2023-07-03 10:05:27,289 736 [DEBUG] - Configuration: CommandName='install'|
CacheLocation='C:\Users\tom\AppData\Local\Temp\chocolatey'|
CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'|
Sources='https://community.chocolatey.org/api/v2/'|SourceType='normal'|
ShowOnlineHelp='False'|Debug='True'|Verbose='True'|Trace='False'|
Force='False'|Noop='False'|HelpRequested='False'|
UnsuccessfulParsing='False'|RegularOutput='True'|QuietOutput='False'|
PromptForConfirmation='True'|DisableCompatibilityChecks='False'|
AcceptLicense='False'|AllowUnofficialBuild='False'|
Input='chocolateygui'|AllVersions='False'|
SkipPackageInstallProvider='False'|SkipHookScripts='False'|
PackageNames='chocolateygui'|Prerelease='False'|ForceX86='False'|
OverrideArguments='False'|NotSilent='False'|
ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
CacheExpirationInMinutes='30'|AllowDowngrade='False'|
ForceDependencies='False'|PinPackage='False'|
Information.PlatformType='Windows'|
Information.PlatformVersion='6.1.7601.65536'|
Information.PlatformName='Windows 7'|
Information.ChocolateyVersion='2.1.0.0'|
Information.ChocolateyProductVersion='2.1.0'|
Information.FullName='choco, Version=2.1.0.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|

Information.Is64BitOperatingSystem='False'|
Information.Is64BitProcess='False'|Information.IsInteractive='True'|
Information.UserName='tom'|Information.UserDomainName='PC'|
Information.IsUserAdministrator='True'|
Information.IsUserSystemAccount='False'|
Information.IsUserRemoteDesktop='False'|
Information.IsUserRemote='False'|Information.IsProcessElevated='True'|
Information.IsLicensedVersion='False'|
Information.IsLicensedAssemblyLoaded='False'|
Information.LicenseType='Foss'|
Information.CurrentDirectory='C:\Users\tom\Desktop'|
Features.AutoUninstaller='True'|Features.ChecksumFiles='True'|
Features.AllowEmptyChecksums='False'|
Features.AllowEmptyChecksumsSecure='True'|
Features.FailOnAutoUninstaller='False'|
Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'|
Features.VirusCheck='False'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|
Features.UseEnhancedExitCodes='False'|
Features.UseFipsCompliantChecksums='False'|
Features.ShowNonElevatedWarnings='True'|
Features.ShowDownloadProgress='True'|
Features.StopOnFirstPackageFailure='False'|
Features.UseRememberedArgumentsForUpgrades='False'|
Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'|
Features.SkipPackageUpgradesWhenNotInstalled='False'|
Features.RemovePackageInformationOnUninstall='False'|
Features.ExitOnRebootDetected='False'|
Features.LogValidationResultsOnWarnings='True'|
Features.UsePackageRepositoryOptimizations='True'|
ListCommand.LocalOnly='False'|ListCommand.IdOnly='False'|
ListCommand.IncludeRegistryPrograms='False'|ListCommand.PageSize='25'|
ListCommand.Exact='False'|ListCommand.ByIdOnly='False'|
ListCommand.ByTagOnly='False'|ListCommand.IdStartsWith='False'|
ListCommand.OrderByPopularity='False'|ListCommand.ApprovedOnly='False'|
ListCommand.DownloadCacheAvailable='False'|
ListCommand.NotBroken='False'|
ListCommand.IncludeVersionOverrides='False'|
ListCommand.ExplicitPageSize='False'|
ListCommand.ExplicitSource='False'|
UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
UpgradeCommand.ExcludePrerelease='False'|
NewCommand.AutomaticPackage='False'|
NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'|
SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'|
SourceCommand.AllowSelfService='False'|
SourceCommand.VisibleToAdminsOnly='False'|
FeatureCommand.Command='unknown'|ConfigCommand.Command='Unknown'|
ApiKeyCommand.Command='Unknown'|PinCommand.Command='Unknown'|
OutdatedCommand.IgnorePinned='False'|
ExportCommand.IncludeVersionNumbers='False'|Proxy.BypassOnLocal='True'|
TemplateCommand.Command='unknown'|CacheCommand.Command='Unknown'|
CacheCommand.RemoveExpiredItemsOnly='False'|
2023-07-03 10:05:31,956 736 [DEBUG] - _ Chocolatey:ChocolateyInstallCommand - Normal Run Mode _
2023-07-03 10:05:32,088 736 [INFO ] - Installing the following packages:
2023-07-03 10:05:32,207 736 [INFO ] - chocolateygui
2023-07-03 10:05:32,303 736 [INFO ] - By installing, you accept licenses for the packages.
2023-07-03 10:05:33,466 736 [DEBUG] - Running list with the following filter = ''
2023-07-03 10:05:33,536 736 [DEBUG] - --- Start of List ---
2023-07-03 10:05:33,651 736 [DEBUG] - Resolving resource PackageSearchResource for source C:\ProgramData\chocolatey\lib
2023-07-03 10:05:34,536 736 [DEBUG] - chocolatey 2.1.0
2023-07-03 10:05:34,596 736 [DEBUG] - --- End of List ---
2023-07-03 10:05:34,638 736 [DEBUG] - Resolving resource ListResource for source https://community.chocolatey.org/api/v2/
2023-07-03 10:05:44,334 736 [WARN ] - Unable to load the service index for source https://community.chocolatey.org/api/v2/.
2023-07-03 10:05:44,392 736 [WARN ] - The source https://community.chocolatey.org/api/v2/ failed to get a NuGet.Protocol.Core.Types.ListResource resource
2023-07-03 10:05:44,401 736 [DEBUG] - Resolving resource PackageMetadataResource for source https://community.chocolatey.org/api/v2/
2023-07-03 10:05:50,920 736 [WARN ] - The source https://community.chocolatey.org/api/v2/ failed to get a NuGet.Protocol.Core.Types.PackageMetadataResource resource
2023-07-03 10:05:50,930 736 [WARN ] - Unable to connect to source 'https://community.chocolatey.org/api/v2/':
 System.NullReferenceException: Object reference not set to an instance of an object.
   at chocolatey.infrastructure.app.nuget.NugetList.<>c__DisplayClass19_1.<FindPackage>b__2()
   at chocolatey.infrastructure.tolerance.FaultTolerance.TryCatchWithLoggingException[T](Func`1 function, String errorMessage, Boolean throwError, Boolean logWarningInsteadOfError, Boolean logDebugInsteadOfError, Boolean isSilent)
2023-07-03 10:05:51,135 736 [ERROR] - chocolateygui not installed. The package was not found with the source(s) listed.
 Source(s): 'https://community.chocolatey.org/api/v2/'
 NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
 the package may not be found.
Please see https://docs.chocolatey.org/en-us/troubleshooting for more
 assistance.
2023-07-03 10:05:51,773 736 [WARN ] - 
Chocolatey installed 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2023-07-03 10:05:51,997 736 [INFO ] - 
2023-07-03 10:05:52,140 736 [ERROR] - Failures
2023-07-03 10:05:52,214 736 [ERROR] -  - chocolateygui - chocolateygui not installed. The package was not found with the source(s) listed.
 Source(s): 'https://community.chocolatey.org/api/v2/'
 NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
 the package may not be found.
Please see https://docs.chocolatey.org/en-us/troubleshooting for more
 assistance.
2023-07-03 10:05:52,668 736 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
2023-07-03 10:05:52,728 736 [DEBUG] - Exiting with 1

Additional Context

No response

@superbonaci superbonaci added the Bug label Jul 3, 2023
@gep13
Copy link
Member

gep13 commented Jul 3, 2023

@superbonaci I believe that the issue that you are seeing is the same as this one:

#3244

Can you please read through that one, and if possible, use the suggestion to view the response/requests in Fiddler, and provide the feedback, so that we can dig into this further.

For now, I am going to close this issue, and we can continue the discussion over there.

@superbonaci
Copy link
Author

Here's the first Fiddler's session log (there are 12 but they are exactly the same):

Raw Headers (Read-only)

CONNECT community.chocolatey.org:443 HTTP/1.1
User-Agent: Chocolatey Command Line/2.1.0 via NuGet Client/6.4.1 (Microsoft Windows NT 6.1.7601 Service Pack 1)
Host: community.chocolatey.org
Connection: Keep-Alive

Response (Raw)

HTTP/1.1 200 Connection Established
FiddlerGateway: Direct
StartTime: 10:47:49.957
Connection: close

fiddler.network.https> HTTPS handshake to community.chocolatey.org (for #3) failed. System.Security.Authentication.AuthenticationException A call to SSPI failed, see inner exception. < The function requested is not supported

Win32 (SChannel) Native Error Code: 0x80090302

@gep13
Copy link
Member

gep13 commented Jul 4, 2023

@superbonaci can you confirm what operating system you are using? You mention 6.1.7601.65536, but just to confirm, are you using Windows 7? Also, have you done any additional configuration regarding SSL/TLS versions on your operating system?

@superbonaci
Copy link
Author

superbonaci commented Jul 4, 2023

@superbonaci can you confirm what operating system you are using? You mention 6.1.7601.65536, but just to confirm, are you using Windows 7? Also, have you done any additional configuration regarding SSL/TLS versions on your operating system?

Yes, that version is Windows 7, and I don't recall changing anything on my operating system. Older versions of chocolatey worked fine, maybe 2.0 or older. I could try restoring a previous backup of the chocolatey folder and see what happens.

@superbonaci
Copy link
Author

superbonaci commented Jul 5, 2023

Chocolatey v1.2.1 works perfectly.
1st Header:

CONNECT community.chocolatey.org:443 HTTP/1.1
User-Agent: NuGet/1.2.1.0 (Microsoft Windows NT 6.1.7601 Service Pack 1)
Host: community.chocolatey.org

1st Response:

HTTP/1.1 200 Connection Established
FiddlerGateway: Direct
StartTime: 10:11:07.989
Connection: close

Encrypted HTTPS traffic flows through this CONNECT tunnel. HTTPS Decryption is enabled in Fiddler, so decrypted sessions running in this tunnel will be shown in the Web Sessions list.

Secure Protocol: Tls12
Cipher: Aes128 128bits
Hash Algorithm: Sha1 160bits
Key Exchange: ECDHE_RSA (0xae06) 256bits

== Server Certificate ==========
[Subject]
  CN=*.chocolatey.org

[Issuer]
  CN=Go Daddy Secure Certificate Authority - G2, OU=http://certs.godaddy.com/repository/, O="GoDaddy.com, Inc.", L=Scottsdale, S=Arizona, C=US

[Serial Number]
  521E64962F68FBE8

[Not Before]
  18/04/2023 6:41:55

[Not After]
  18/04/2024 6:32:32

[Thumbprint]
  C456A53A0BAAA570DB5943F475AA14DEF84E61C8

[SubjectAltNames]
*.chocolatey.org, chocolatey.org

2nd Header:

GET /api/v2/ HTTP/1.0
User-Agent: NuGet/1.2.1.0 (Microsoft Windows NT 6.1.7601 Service Pack 1)
Host: community.chocolatey.org

2nd Response:

HTTP/1.1 200 OK
Date: Wed, 05 Jul 2023 10:11:03 GMT
Content-Type: application/xml;charset=utf-8
Content-Length: 407
Connection: close
Retry-After: 84710
Cache-Control: max-age=31536000
DataServiceVersion: 1.0;
X-AspNet-Version: 4.0.30319
X-Frame-Options: deny
X-Powered-By: ASP.NET
CF-Cache-Status: HIT
Age: 45077
Last-Modified: Wed, 05 Jul 2023 01:39:46 GMT
Accept-Ranges: bytes
Strict-Transport-Security: max-age=12960000
X-Content-Type-Options: nosniff
Server: cloudflare
CF-RAY: 7e2031ea89606617-MAD

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<service xml:base="http://community.chocolatey.org/api/v2/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app">
  <workspace>
    <atom:title>Default</atom:title>
    <collection href="Packages">
      <atom:title>Packages</atom:title>
    </collection>
  </workspace>
</service>

@superbonaci
Copy link
Author

Finally downgraded to Chocolatey v1.2.1 and pinned it, so now I can upgrade all other programs:

PS C:\Users\mf> choco pin add --name=Chocolateygui --version 1.1.0
Chocolatey v1.2.1
Trying to add a pin for Chocolateygui
Successfully added a pin for chocolateygui v1.1.0.
PS C:\Users\mf> choco pin add --name=Chocolatey --version 1.2.1
Chocolatey v1.2.1
Trying to add a pin for Chocolatey
Successfully added a pin for chocolatey v1.2.1.

If I try to upgrade then says it's pinned:

PS C:\Users\mf> choco upgrade all
Chocolatey v1.2.1
Upgrading the following packages:
all
By upgrading, you accept licenses for the packages.

You have chocolatey v1.2.1 installed. Version 2.1.0 is available based on your source(s).
chocolatey is pinned. Skipping pinned package.

You have chocolateygui v1.1.0 installed. Version 2.1.0 is available based on your source(s).
chocolateygui is pinned. Skipping pinned package.

Chocolatey upgraded 0/2 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Warnings:
 - chocolatey - chocolatey is pinned. Skipping pinned package.
 - chocolateygui - chocolateygui is pinned. Skipping pinned package.

@superbonaci
Copy link
Author

Chocolatey 1.4.0 works fine too.

@gep13
Copy link
Member

gep13 commented Jul 7, 2023

@superbonaci I have been doing some digging into this, and I believe that I can explain what is going on, as well as steps that can be completed to get things working.

As mentioned in the release notes for Chocolatey CLI v2.0.0, we made some changes for:

Switch to use only the recommended TLS versions without fallback to earlier insecure options

You can find more details about this in the issue.

In prior versions of Chocolatey CLI (i.e. 1.4.0 and earlier), we took ownership of the TLS version that was used to make HTTP requests. We did this because we wanted/needed to add support for TLS 1.2, something that earlier versions of .NET Framework didn't understand.

With version 2.0.0 of Chocolatey, we switched to using .NET Framework 4.8, which meant the additional work that we were doing was no longer required. The decision was taken to default to using the TLS versions that are configured at the Operating System level.

Since you are using Windows 7, the defaults to which TLS version to use, don't match up with the requirements that are needed to access the Chocolatey Community Repository, and that is why you are seeing the error that you are seeing.

You can fix this by changing the default TLS versions used for the Operating System. The direct way to do this is by changing the necessary registry keys, but this can be complicated, so this is not the way that I would recommend making this change. Instead, I would recommend that you use a tool called IISCrypto. Since you are back to a working state, you should be able to install this using choco install iiscrypto.

Once installed, open the application, and you should see the following:

image

Go ahead and click the Best Practices button, and the necessary changes will be made. You will be prompted that you need to click the Apply button, but don't do that just yet.

Switch to the Cipher Suites tab, and also click the Best Practices button

image

Once again, you will be prompted to click the Apply button, go ahead and do this, and you will be prompted to reboot the machine. Go ahead and do this.

Once you reboot your machine, you should be able to run choco upgrade chocolatey, and then things should work for you, where they weren't before.

I have tested this on a Windows 7, Windows 2008, and Windows 2008 R2 machine, and Chocolatey started working on each of these operating systems, where it had been failing with the problem that you originally described.

It would be great if you could take these steps for a spin, and let us know if they work for you.

Thank you for bringing this to our attention!

@gep13
Copy link
Member

gep13 commented Jul 7, 2023

I have raised an issue to document this properly on the site, and I will likely create a video going through the complete process as well.

@gep13 gep13 changed the title Unable to load the service index for source https://community.chocolatey.org/api /v2/. Chocolatey CLI v2.x is not able to communicate with Chocolatey Community Repository due to TLS issue Jul 7, 2023
@gep13
Copy link
Member

gep13 commented Jul 7, 2023

@superbonaci as a side note, you can run:

choco upgrade all --except="'chocolatey'"

Which would prevent the upgrade of the packages named in the option.

Or, you can run:

choco config set --name="'upgradeAllExceptions'" --value="'chocolatey'"

This functionality is similar to the pin operation that you were performing above.

@gep13 gep13 changed the title Chocolatey CLI v2.x is not able to communicate with Chocolatey Community Repository due to TLS issue Chocolatey CLI v2.x (running on Windows 7) is not able to communicate with Chocolatey Community Repository due to TLS issue Jul 7, 2023
@superbonaci
Copy link
Author

superbonaci commented Jul 7, 2023

@gep13 instead of installing choco install iiscrypto, what happens if I install net Framework 4.8.x?
https://community.chocolatey.org/packages?q=net+framework+4.8

Should I be able then to use the newer version of TLS without any additional configuration, or NF4.8 is not compatible with W7 32 bits?

According to this MS site, W7 SP1 is compatible with NF up to 4.8, but not 4.8.1:
.NET Framework system requirements

@gep13
Copy link
Member

gep13 commented Jul 7, 2023

I don't believe that will make any difference, but it also isn't something I have tried.

My understanding is that what is required is an OS level change to alter the default TLS version.

@gep13
Copy link
Member

gep13 commented Jul 7, 2023

Also, the installation of Chocolatey CLI v2.x will have already installed .NET Framework 4.8, as this is a requirement.

@superbonaci
Copy link
Author

superbonaci commented Jul 7, 2023

Confirming that running iiscrypto.exe and changing Schannel and Cipher Suite to Best practices, does indeed work. No need to reboot at all for me, and after reboot keeps working.
chocolatey and chocolateygui upgraded to 2.1.0 working fine.

Did setup iiscrypto after upgrading the packages, can be done before as well.

@gep13
Copy link
Member

gep13 commented Jul 7, 2023

That is great news! Thank you for confirming!

We will get the docs updated with this information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants