{"action":"created","issue":{"url":"https://api.github.com/repos/voxpupuli/puppet-download_file/issues/82","repository_url":"https://api.github.com/repos/voxpupuli/puppet-download_file","labels_url":"https://api.github.com/repos/voxpupuli/puppet-download_file/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/voxpupuli/puppet-download_file/issues/82/comments","events_url":"https://api.github.com/repos/voxpupuli/puppet-download_file/issues/82/events","html_url":"https://github.com/voxpupuli/puppet-download_file/issues/82","id":368189272,"node_id":"MDU6SXNzdWUzNjgxODkyNzI=","number":82,"title":"Download from github.com returns WebException The request was aborted: Could not create SSL/TLS secure channel.","user":{"login":"hjohnst6","id":10533522,"node_id":"MDQ6VXNlcjEwNTMzNTIy","avatar_url":"https://avatars1.githubusercontent.com/u/10533522?v=4","gravatar_id":"","url":"https://api.github.com/users/hjohnst6","html_url":"https://github.com/hjohnst6","followers_url":"https://api.github.com/users/hjohnst6/followers","following_url":"https://api.github.com/users/hjohnst6/following{/other_user}","gists_url":"https://api.github.com/users/hjohnst6/gists{/gist_id}","starred_url":"https://api.github.com/users/hjohnst6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hjohnst6/subscriptions","organizations_url":"https://api.github.com/users/hjohnst6/orgs","repos_url":"https://api.github.com/users/hjohnst6/repos","events_url":"https://api.github.com/users/hjohnst6/events{/privacy}","received_events_url":"https://api.github.com/users/hjohnst6/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-09T12:38:10Z","updated_at":"2018-12-14T08:30:40Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nThank you for contributing to this project!\r\n\r\n- This project has a Contributor Code of Conduct: https://voxpupuli.org/coc/\r\n- Please check that here is no existing issue or PR that addresses your problem.\r\n- Please fill the following form to enable us to help you.\r\n- Our vulnerabilities reporting process is at https://voxpupuli.org/security/\r\n\r\n-->\r\n\r\n## Affected Puppet, Ruby, OS and module versions/distributions\r\n\r\n- Puppet: Puppet 5.5.6 Client /  Puppetserver 2.8.1 (from pc1-1.1.0)\r\n- Module version: 3.1.0\r\n- OS: Client running on Windows Server 2016\r\n\r\n## How to reproduce (e.g Puppet code you use)\r\n\r\n    download_file { $installer:\r\n      url                   => 'https://github.com/git-for-windows/git/releases/download/v2.19.1.windows.1/Git-2.19.1-64-bit.exe',\r\n      destination_directory => 'c:\\\\'\r\n    }\r\n\r\n## What are you seeing\r\n\r\nWhen I run Puppet agent manually I see the following error:\r\n\r\n    Notice: /Stage[main]/Git::Install::Windows/Download_file[Git-2.19.1-64-bit.exe]/File[download-Git-2.19.1-64-bit.exe.ps1]/ensure: defined content as '{md5}4a913e51b88e77f9750f702cdc6c02c7'\r\n    Notice: /Stage[main]/Git::Install::Windows/Download_file[Git-2.19.1-64-bit.exe]/Exec[download-Git-2.19.1-64-bit.exe]/returns: System.Net.WebException\r\n    Notice: /Stage[main]/Git::Install::Windows/Download_file[Git-2.19.1-64-bit.exe]/Exec[download-Git-2.19.1-64-bit.exe]/returns: The request was aborted: Could not create SSL/TLS secure channel.\r\n    Notice: /Stage[main]/Git::Install::Windows/Download_file[Git-2.19.1-64-bit.exe]/Exec[download-Git-2.19.1-64-bit.exe]/returns:\r\n    Error: 'c:\\\\download-Git-2.19.1-64-bit.exe.ps1' returned 1 instead of one of [0]\r\n    Error: /Stage[main]/Git::Install::Windows/Download_file[Git-2.19.1-64-bit.exe]/Exec[download-Git-2.19.1-64-bit.exe]/returns: change from 'notrun' to ['0'] failed: 'c:\\\\download-Git-2.19.1-64-bit.exe.ps1' returned 1 instead of one of [0]\r\n\r\n## What behaviour did you expect instead\r\n\r\nI expected the Git executable to downloaded to C:\\Git-2.19.1-64-bit.exe\r\n\r\n## Output log\r\n\r\nSee above.\r\n\r\n## Any additional information you'd like to impart\r\n\r\nA potential fix is to add the following into the try block in the download PowerShell script:\r\n\r\n    [Net.ServicePointManager]::SecurityProtocol = \"tls12, tls11\"\r\n\r\nFor example, in the case of the PowerShell script generated by the above Puppet code:\r\n\r\n    try {\r\n      [Net.ServicePointManager]::SecurityProtocol = \"tls12, tls11\"\r\n      $webclient.DownloadFile('https://github.com/git-for-windows/git/releases/download/v2.19.1.windows.1/Git-2.19.1-64-bit.exe', 'c:\\\\Git-2.19.1-64-bit.exe')\r\n    }\r\n\r\nWhen I run the PowerShell script manually in ISA the download completes successfully.\r\n\r\nThere may be issues around setting the security protocol like this both outside of Windows Server 2016 and for remote URLs that only support tls1.0 or ssl3 (which would be Very Bad but folk might expect download_file to still work)."},"comment":{"url":"https://api.github.com/repos/voxpupuli/puppet-download_file/issues/comments/447252918","html_url":"https://github.com/voxpupuli/puppet-download_file/issues/82#issuecomment-447252918","issue_url":"https://api.github.com/repos/voxpupuli/puppet-download_file/issues/82","id":447252918,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzI1MjkxOA==","user":{"login":"hdep","id":12408502,"node_id":"MDQ6VXNlcjEyNDA4NTAy","avatar_url":"https://avatars2.githubusercontent.com/u/12408502?v=4","gravatar_id":"","url":"https://api.github.com/users/hdep","html_url":"https://github.com/hdep","followers_url":"https://api.github.com/users/hdep/followers","following_url":"https://api.github.com/users/hdep/following{/other_user}","gists_url":"https://api.github.com/users/hdep/gists{/gist_id}","starred_url":"https://api.github.com/users/hdep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdep/subscriptions","organizations_url":"https://api.github.com/users/hdep/orgs","repos_url":"https://api.github.com/users/hdep/repos","events_url":"https://api.github.com/users/hdep/events{/privacy}","received_events_url":"https://api.github.com/users/hdep/received_events","type":"User","site_admin":false},"created_at":"2018-12-14T08:30:40Z","updated_at":"2018-12-14T08:30:40Z","author_association":"NONE","body":"Hi, is there any work on this issue ? Can I help with something ? "}}
{"actor":{"display_login":"hdep"}}