title: lein repl fails due to authentication behind corporate proxy (windows 7)
body: <p>I am having issues with proxy authentication when running <code>lein repl</code>.
  I am using</p>
  
  <pre><code>&gt; lein --version
      Leiningen 2.8.1 on Java 1.8.0_181 Java HotSpot(TM) 64-Bit Server VM
  </code></pre>
  
  <p>on Windows 7 64 bit. I have set the http_proxy and https_proxy environment variables.
  I installed via</p>
  
  <pre><code>&gt; lein self-install
  </code></pre>
  
  <p>from powershell. This had problems with proxy authentication as well, but I was abled to solve the issue by adapting the call to powershell in the script (use <code>$client.Proxy.Credentials = Get-Credential</code>, and adjusting SecurityProtocolType).</p>
  
  <p>When I try to run <code>lein repl</code> I get </p>
  
  <pre><code>PS&gt; lein repl
  nREPL server started on port 54104 on host 127.0.0.1 - nrepl://127.0.0.1:54104
  org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: reply:reply:jar:0.3.7, org.thnetos:cd-client:jar:0.3.6, clj-http-lite:clj-http-lite:jar:0.2.0, cheshire:cheshire:jar:4.0.3, clj-stacktrace:clj-stacktrace:jar:0.2.7, com.cemerick:drawbridge:jar:0.0.6, clj-http:clj-http:jar:0.3.6,
  :0.3.7 from/to clojars (https://repo.clojars.org/): Not authorized by proxy , ReasonPhrase:Proxy Authentication Required.
   at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies (DefaultRepositorySystem.java:393)
      sun.reflect.NativeMethodAccessorImpl.invoke0 (:-2)
      sun.reflect.NativeMethodAccessorImpl.invoke (:-1)
      sun.reflect.DelegatingMethodAccessorImpl.invoke (:-1)
      java.lang.reflect.Method.invoke (:-1)
      clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:93)
      clojure.lang.Reflector.invokeInstanceMethod (Reflector.java:28)
      cemerick.pomegranate.aether$resolve_dependencies_STAR_.invokeStatic (aether.clj:806)
      cemerick.pomegranate.aether$resolve_dependencies_STAR_.doInvoke (aether.clj:707)
      clojure.lang.RestFn.applyTo (RestFn.java:137)
      clojure.core$apply.invokeStatic (core.clj:646)
      clojure.core$apply.invoke (core.clj:641)
      cemerick.pomegranate.aether$resolve_dependencies.invokeStatic (aether.clj:815)
      cemerick.pomegranate.aether$resolve_dependencies.doInvoke (aether.clj:809)
      clojure.lang.RestFn.applyTo (RestFn.java:137)
      clojure.core$apply.invokeStatic (core.clj:646)
      clojure.core$apply.invoke (core.clj:641)
      cemerick.pomegranate$add_dependencies.invokeStatic (pomegranate.clj:83)
      cemerick.pomegranate$add_dependencies.doInvoke (pomegranate.clj:57)
      clojure.lang.RestFn.invoke (RestFn.java:457)
      leiningen.repl$client.invokeStatic (repl.clj:261)
      leiningen.repl$client.invoke (repl.clj:258)
      leiningen.repl$repl.invokeStatic (repl.clj:320)
      leiningen.repl$repl.doInvoke (repl.clj:267)
      clojure.lang.RestFn.invoke (RestFn.java:425)
      leiningen.repl$repl.invokeStatic (repl.clj:307)
      leiningen.repl$repl.invoke (repl.clj:267)
      clojure.lang.Var.invoke (Var.java:379)
      clojure.lang.AFn.applyToHelper (AFn.java:154)
      clojure.lang.Var.applyTo (Var.java:700)
      clojure.core$apply.invokeStatic (core.clj:648)
      clojure.core$apply.invoke (core.clj:641)
      leiningen.core.main$partial_task$fn__4667.doInvoke (main.clj:284)
      clojure.lang.RestFn.invoke (RestFn.java:410)
      clojure.lang.AFn.applyToHelper (AFn.java:154)
      clojure.lang.RestFn.applyTo (RestFn.java:132)
      clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
      clojure.lang.RestFn.applyTo (RestFn.java:137)
      clojure.core$apply.invokeStatic (core.clj:648)
      clojure.core$apply.invoke (core.clj:641)
      leiningen.core.main$apply_task.invokeStatic (main.clj:334)
      leiningen.core.main$apply_task.invoke (main.clj:320)
      leiningen.core.main$resolve_and_apply.invokeStatic (main.clj:340)
      leiningen.core.main$resolve_and_apply.invoke (main.clj:336)
      leiningen.core.main$_main$fn__4734.invoke (main.clj:420)
      leiningen.core.main$_main.invokeStatic (main.clj:411)
      leiningen.core.main$_main.doInvoke (main.clj:408)
      clojure.lang.RestFn.invoke (RestFn.java:408)
      clojure.lang.Var.invoke (Var.java:379)
      clojure.lang.AFn.applyToHelper (AFn.java:154)
      clojure.lang.Var.applyTo (Var.java:700)
      clojure.core$apply.invokeStatic (core.clj:646)
      clojure.main$main_opt.invokeStatic (main.clj:314)
      clojure.main$main_opt.invoke (main.clj:310)
      clojure.main$main.invokeStatic (main.clj:421)
      clojure.main$main.doInvoke (main.clj:384)
      clojure.lang.RestFn.invoke (RestFn.java:436)
      clojure.lang.Var.invoke (Var.java:388)
      clojure.lang.AFn.applyToHelper (AFn.java:160)
      clojure.lang.Var.applyTo (Var.java:700)
      clojure.main.main (main.java:37)
  Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: reply:reply:jar:0.3.7, org.thnetos:cd-client:jar:0.3.6, clj-http-lite:clj-http-lite:jar:0.2.0, cheshire:cheshire:jar:4.0.3, clj-stacktrace:clj-stacktrace:jar:0.2.7, com.cemerick:drawbridge:jar:0.0.6, clj-http:clj-http:ja
  reply:jar:0.3.7 from/to clojars (https://repo.clojars.org/): Not authorized by proxy , ReasonPhrase:Proxy Authentication Required.
   at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:453)
      org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:255)
      org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies (DefaultRepositorySystem.java:376)
      sun.reflect.NativeMethodAccessorImpl.invoke0 (:-2)
      sun.reflect.NativeMethodAccessorImpl.invoke (:-1)
      sun.reflect.DelegatingMethodAccessorImpl.invoke (:-1)
      java.lang.reflect.Method.invoke (:-1)
      clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:93)
      clojure.lang.Reflector.invokeInstanceMethod (Reflector.java:28)
      cemerick.pomegranate.aether$resolve_dependencies_STAR_.invokeStatic (aether.clj:806)
      cemerick.pomegranate.aether$resolve_dependencies_STAR_.doInvoke (aether.clj:707)
      clojure.lang.RestFn.applyTo (RestFn.java:137)
      clojure.core$apply.invokeStatic (core.clj:646)
      clojure.core$apply.invoke (core.clj:641)
      cemerick.pomegranate.aether$resolve_dependencies.invokeStatic (aether.clj:815)
      cemerick.pomegranate.aether$resolve_dependencies.doInvoke (aether.clj:809)
      clojure.lang.RestFn.applyTo (RestFn.java:137)
      clojure.core$apply.invokeStatic (core.clj:646)
      clojure.core$apply.invoke (core.clj:641)
      cemerick.pomegranate$add_dependencies.invokeStatic (pomegranate.clj:83)
      cemerick.pomegranate$add_dependencies.doInvoke (pomegranate.clj:57)
      clojure.lang.RestFn.invoke (RestFn.java:457)
      leiningen.repl$client.invokeStatic (repl.clj:261)
      leiningen.repl$client.invoke (repl.clj:258)
      leiningen.repl$repl.invokeStatic (repl.clj:320)
      leiningen.repl$repl.doInvoke (repl.clj:267)
      clojure.lang.RestFn.invoke (RestFn.java:425)
      leiningen.repl$repl.invokeStatic (repl.clj:307)
      leiningen.repl$repl.invoke (repl.clj:267)
      clojure.lang.Var.invoke (Var.java:379)
      clojure.lang.AFn.applyToHelper (AFn.java:154)
      clojure.lang.Var.applyTo (Var.java:700)
      clojure.core$apply.invokeStatic (core.clj:648)
      clojure.core$apply.invoke (core.clj:641)
      leiningen.core.main$partial_task$fn__4667.doInvoke (main.clj:284)
      clojure.lang.RestFn.invoke (RestFn.java:410)
      clojure.lang.AFn.applyToHelper (AFn.java:154)
      clojure.lang.RestFn.applyTo (RestFn.java:132)
      clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
      clojure.lang.RestFn.applyTo (RestFn.java:137)
      clojure.core$apply.invokeStatic (core.clj:648)
      clojure.core$apply.invoke (core.clj:641)
      leiningen.core.main$apply_task.invokeStatic (main.clj:334)
      leiningen.core.main$apply_task.invoke (main.clj:320)
      leiningen.core.main$resolve_and_apply.invokeStatic (main.clj:340)
      leiningen.core.main$resolve_and_apply.invoke (main.clj:336)
      leiningen.core.main$_main$fn__4734.invoke (main.clj:420)
      leiningen.core.main$_main.invokeStatic (main.clj:411)
      leiningen.core.main$_main.doInvoke (main.clj:408)
      clojure.lang.RestFn.invoke (RestFn.java:408)
      clojure.lang.Var.invoke (Var.java:379)
      clojure.lang.AFn.applyToHelper (AFn.java:154)
      clojure.lang.Var.applyTo (Var.java:700)
      clojure.core$apply.invokeStatic (core.clj:646)
      clojure.main$main_opt.invokeStatic (main.clj:314)
      clojure.main$main_opt.invoke (main.clj:310)
      clojure.main$main.invokeStatic (main.clj:421)
      clojure.main$main.doInvoke (main.clj:384)
      clojure.lang.RestFn.invoke (RestFn.java:436)
      clojure.lang.Var.invoke (Var.java:388)
      clojure.lang.AFn.applyToHelper (AFn.java:160)
      clojure.lang.Var.applyTo (Var.java:700)
      clojure.main.main (main.java:37)
  Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact reply:reply:jar:0.3.7 from/to clojars (https://repo.clojars.org/): Not authorized by proxy , ReasonPhrase:Proxy Authentication Required.
   at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed (ArtifactTransportListener.java:52)
      org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:364)
      org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run (RunnableErrorForwarder.java:76)
      java.util.concurrent.ThreadPoolExecutor.runWorker (:-1)
      java.util.concurrent.ThreadPoolExecutor$Worker.run (:-1)
      java.lang.Thread.run (:-1)
  Caused by: org.apache.maven.wagon.authorization.AuthorizationException: Not authorized by proxy , ReasonPhrase:Proxy Authentication Required.
   at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData (AbstractHttpClientWagon.java:1011)
      org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData (AbstractHttpClientWagon.java:962)
      org.apache.maven.wagon.StreamWagon.getInputStream (StreamWagon.java:126)
      org.apache.maven.wagon.StreamWagon.getIfNewer (StreamWagon.java:88)
      org.apache.maven.wagon.StreamWagon.get (StreamWagon.java:61)
      org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run (WagonTransporter.java:569)
      org.eclipse.aether.transport.wagon.WagonTransporter.execute (WagonTransporter.java:436)
      org.eclipse.aether.transport.wagon.WagonTransporter.get (WagonTransporter.java:413)
      org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask (BasicRepositoryConnector.java:456)
      org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:359)
      org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run (RunnableErrorForwarder.java:76)
      java.util.concurrent.ThreadPoolExecutor.runWorker (:-1)
      java.util.concurrent.ThreadPoolExecutor$Worker.run (:-1)
      java.lang.Thread.run (:-1)
  </code></pre>
  
  <p>I am out of ideas how to set the proxy authentication.</p>
  
  <p>EDIT:
  I tried adding the proxy parameters to the java call with <code>-Dhttp.proxyHost=myHost -Dhttp.proxyPort=myPort -Dhttp.proxyUser=myUser -Dhttp.proxyPassword=myPw</code> these parameters seem to not be used/have no effect.
  The corresponding parameters work with e.g. visual studio code.</p>