title: download.file() error: InternetOpenURL failed: 'An error occurred in the secure channel support'
body: <p>I am trying to install a package (gg3D) from GitHub in Rstudio.  I was unable to install it using</p>
  
  <pre><code>devtools::install_github("AckerDWM/gg3D")
  </code></pre>
  
  <p>(Error: Failed to install 'gg3D' from GitHub).  I tried changing the download method (<code>curl</code>, <code>libcurl</code>, etc.) but to no avail. Then I decided to download the source file and try to install it manually.  Downloading the file did not work either:</p>
  
  <pre><code>source_URL &lt;- "http://github.com/repos/AckerDWM/gg3D/archive/master.zip"
  utils::download.file(source_URL, destfile = "tmp.zip")
  </code></pre>
  
  <p>This is when I get the error: <code>InternetOpenURL failed: 'An error occurred in the secure channel support'</code></p>
  
  <p>I believe this is a firewall/proxy issue (I have no problem downloading this on another computer with similar specs).</p>
  
  <p>In case it's helpful, I'm running R version 3.6.1 on Windows 7.</p>
  
  <hr>
  
  <p>Focusing solely on the downloading error, <strong>what I have tried</strong>:</p>
  
  <ol>
  <li>Changing the download.file <code>method</code> (which is <code>wininet</code> by default), e.g. 
  
  <ul>
  <li><code>utils::download.file(source_URL, destfile = "tmp.zip", method = "libcurl")</code> returns as <code>HTTP status was '404 Not Found'</code> error;</li>
  <li><code>utils::download.file(source_URL, destfile = "tmp.zip", method = "curl")</code> returns <code>'curl' call had nonzero exit status</code>;</li>
  <li>As above for <code>method = "wget"</code>.</li>
  </ul></li>
  <li>On the RStudio menu, Tools > Global Options... > Packages > and unchecking the box “Use secure download method for HTTP”. Has no effect.  </li>
  <li><code>setInternet2(use = FALSE)</code> (R warns that this is defunct).</li>
  <li>Trying both <code>http</code> and <code>https</code>.</li>
  </ol>
  
  <p>These proposed solutions came from the following linked SO articles (but they did not work for me):   </p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/33355444/r-when-trying-to-install-package-internetopenurl-failed">R - when trying to install package: InternetOpenUrl failed</a></li>
  <li><a href="https://stackoverflow.com/questions/25599943/unable-to-install-packages-in-latest-version-of-rstudio-and-r-version-3-1-1">Unable to install packages in latest version of RStudio and R Version.3.1.1</a></li>
  <li><a href="https://stackoverflow.com/questions/22721819/download-file-fails-in-rstudio">Download.file fails in RStudio</a></li>
  </ul>
  
  <p>Similar to (no solutions):</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/55505611/installrupdater-in-addition-warning-message-in-filecon-r-internetop">installr::updateR() In addition: Warning message: In file(con, &quot;r&quot;) : InternetOpenUrl failed</a>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/29086838/internetopenurl-failed-download-file-in-r?lq=1">InternetOpenUrl failed: &#39;&#39; download.file in R</a></li>
  </ul></li>
  </ul>