IBM-Cloud / ibm-cloud-developer-tools

Installation scripts for new IBM Cloud Developer CLI Plugin and it's dependencies.
Apache License 2.0
131 stars 146 forks source link

Fail to install helm #37

Closed shijinupc closed 6 years ago

shijinupc commented 6 years ago

Summary Fail to install helm

Steps to reproduce

  1. Run "Set-ExecutionPolicy Unrestricted; iex(New-Object Net.WebClient).DownloadString('http://ibm.biz/idt-win-installer')" at win10 64

Operating System Specify: Windows

Supporting details

PS C:\WINDOWS\system32> Set-ExecutionPolicy Unrestricted; iex(New-Object Net.WebClient).DownloadString('http://ibm.biz/i dt-win-installer') Set-ExecutionPolicy : Windows PowerShell 已成功更新你的执行策略,但在更具体的作业域中定义的策略覆盖了该设置。由于发生覆 盖,你的外壳程序将保留其当前的有效执行策略 Restricted。请键入“Get-ExecutionPolicy -List”以查看你的执行策略设置。有关 详细信息,请参阅“Get-Help Set-ExecutionPolicy”。 所在位置 行:1 字符: 1 + Set-ExecutionPolicy Unrestricted; iex(New-Object Net.WebClient).Downl ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : PermissionDenied: (:) [Set-ExecutionPolicy], SecurityException + FullyQualifiedErrorId : ExecutionPolicyOverride,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand [main] --==[ IBM Cloud Developer Tools - Installer for Windows, v1.2.0 ]==-- [install] Starting Installation/Update... [install_deps] Checking for external dependency: git [install_deps] Checking for external dependency: docker [install_deps] Checking for external dependency: kubectl [install_deps] Checking for external dependency: helm [install_deps] Installing/updating external dependency: helm Invoke-WebRequest : 请求被中止: 未能创建 SSL/TLS 安全通道。 所在位置 行:189 字符: 19 + ... elm_url = ((Invoke-WebRequest https://github.com/kubernetes/helm -Use ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest],WebExce ption + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand [install_deps] Helm URL : 不能对 Null 值表达式调用方法。 所在位置 行:191 字符: 5 + $helm_file = $helm_url.Split("/")[-1] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [],RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull [install_deps] Helm File: Invoke-WebRequest : 无法对参数“Uri”执行参数验证。参数为 Null 或空。请提供一个不为 Null 或空的参数,然后重试该命令。 所在位置 行:193 字符: 23 + Invoke-WebRequest $helm_url -UseBasicParsing -outfile "$helm_file ... + ~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Invoke-WebRequest],ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeWebRequestCommand Expand-7Zip : 无法对参数“ArchiveFileName”执行参数验证。参数为 Null 或空。请提供一个不为 Null 或空的参数,然后重试该命 令。 所在位置 行:198 字符: 17 + Expand-7Zip $helm_file . + ~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Expand-7Zip],ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,SevenZip4PowerShell.Expand7Zip 不能对 Null 值表达式调用方法。 所在位置 行:199 字符: 5 + $tar_file = $helm_file.Replace('.gz','') + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [],RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull Expand-7Zip : 无法对参数“ArchiveFileName”执行参数验证。参数为 Null 或空。请提供一个不为 Null 或空的参数,然后重试该命 令。 所在位置 行:200 字符: 17 + Expand-7Zip $tar_file "C:\Program Files\helm" + ~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Expand-7Zip],ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,SevenZip4PowerShell.Expand7Zip Remove-Item : 无法将参数绑定到参数“Path”,因为该参数是空值。 所在位置 行:201 字符: 17 + Remove-Item $helm_file -erroraction 'silentlycontinue' + ~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Remove-Item],ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.RemoveItemC ommand Remove-Item : 无法将参数绑定到参数“Path”,因为该参数是空值。 所在位置 行:202 字符: 17 + Remove-Item $tar_file -erroraction 'silentlycontinue' + ~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Remove-Item],ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.RemoveItemC ommand [install_deps] Install/update completed for: helm bx already installed 正在检查更新... 无需更新。CLI 已经是最新版本。 [install_bx] IBM Cloud CLI version: C:\Program Files\IBM\Bluemix\bin\bx.exe version 0.6.5+0183260-2018-02-05T06:56:08+00:00 [install_plugins] Installing/updating IBM Cloud CLI plugins used by IDT... [install_plugins] Checking status of plugin: Cloud-Functions [install_plugins] Updating plugin 'Cloud-Functions' 正在检查存储库“Bluemix”中插件“cloud-functions”的升级... 无更新可用。 [install_plugins] Checking status of plugin: container-registry [install_plugins] Updating plugin 'container-registry' 正在检查存储库“Bluemix”中插件“container-registry”的升级... 无更新可用。 [install_plugins] Checking status of plugin: container-service [install_plugins] Updating plugin 'container-service' 正在检查存储库“Bluemix”中插件“container-service”的升级... 无更新可用。 [install_plugins] Checking status of plugin: dev [install_plugins] Updating plugin 'dev' 正在检查存储库“Bluemix”中插件“dev”的升级... 无更新可用。 [install_plugins] Checking status of plugin: schematics [install_plugins] Updating plugin 'schematics' 正在检查存储库“Bluemix”中插件“schematics”的升级... 无更新可用。 [install_plugins] Checking status of plugin: sdk-gen [install_plugins] Updating plugin 'sdk-gen' 正在检查存储库“Bluemix”中插件“sdk-gen”的升级... 无更新可用。 [install_plugins] Running 'bx plugin list'... 正在列出已安装的插件... 插件名称 版本 container-service 0.1.481 dev 1.2.1 schematics 1.3.4 sdk-gen 0.1.9 cloud-functions 1.0.9 container-registry 0.1.304 [install_plugins] Finished installing/updating plugins Creating 'idt' script to act as shortcut to 'bx dev' command... [install] Install finished. [quit] --==[ Finished. Total time: 00:00:26 seconds ]==--

Development "done" checklist

rstephenrrtx commented 6 years ago

Error: Unable to connect to github.com ... elm_url = ((Invoke-WebRequest https://github.com/kubernetes/helm -Use ... due to Windows Powershell default of TLS 1.0. Github now requires TLS 1.2.

Workaround:

  1. From a Powershell terminal (Run as Administrator), enter this command: [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 This will enable TLS 1.2 for the Powershell session. Note: This is only active for the current terminal session.
  2. Continue the install with this command: Set-ExecutionPolicy Unrestricted; iex(New-Object Net.WebClient).DownloadString('http://ibm.biz/idt-win-installer')

Fix: PR created to merge the workaround into the helm section. https://github.com/IBM-Cloud/ibm-cloud-developer-tools/pull/38

steveclay commented 6 years ago

We have a new helm install problem in #54, but I assume this one is resolved. Please reopen if I am incorrect.