title: renv:restore() always fails in windows
body: <p>Whenever I want to recreate a project on my windows machine using <code>renv:restore()</code> it always fails installing packages. I always get the same error (although the packages may change):</p>
  <pre><code>Retrieving 'https://cloud.r-project.org/src/contrib/Archive/xfun/xfun_0.21.tar.gz' ...
  Error: failed to retrieve package 'xfun'
  In addition: Warning messages:
  1: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate. 
  2: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate. 
  3: download failed [error code 35] 
  4: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate. 
  5: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate. 
  </code></pre>
  <p>This is my session info:</p>
  <pre><code>&gt; sessionInfo()
  R version 4.0.5 (2021-03-31)
  Platform: x86_64-w64-mingw32/x64 (64-bit)
  Running under: Windows 10 x64 (build 19042)
  
  Matrix products: default
  
  locale:
  [1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252
  [4] LC_NUMERIC=C                            LC_TIME=English_United Kingdom.1252    
  
  attached base packages:
  [1] stats     graphics  grDevices datasets  utils     methods   base     
  
  loaded via a namespace (and not attached):
  [1] compiler_4.0.5 tools_4.0.5    renv_0.12.0   
  </code></pre>
  <p>And this might also be useful:</p>
  <pre><code>&gt; getOption(&quot;download.file.method&quot;)
  [1] &quot;wininet&quot;
  &gt; renv:::renv_download_file_method()
  [1] &quot;curl&quot;
  &gt;
  </code></pre>
  <p>After running: <code>Sys.setenv(RENV_DOWNLOAD_METHOD = &quot;curl&quot;)</code> (or<code> wininet</code> or <code>libcurl</code>) I always get the same error as before.</p>
  <p>As a workaround I did the following:</p>
  <ol>
  <li>Close the project</li>
  <li>Install package as normal (without renv)</li>
  <li>Open the project using renv</li>
  <li>Restore snapshot</li>
  </ol>
  <p>If the packages have previously been installed, they will be symlinked and they would work.</p>
  <p>Unfortunately, this is extremely cumbersome, as many packages have dependencies and I have to manually install them all, and that's precisely one of the things I want to avoid and one of the reasons for using renv!</p>