title: "Server returned HTTP response code: 403" error installing Jenkins plugin
body: <p>I'm seeing the below error when I try to install plugins for Jenkins.</p>
  
  <pre class="lang-none prettyprint-override"><code>Microsoft Windows [Version 6.3.9600]
  (c) 2013 Microsoft Corporation. All rights reserved.
  
  C:\Users\tech&gt;cd C:\Program Files (x86)\Jenkins
  
  C:\Program Files (x86)\Jenkins&gt;java -jar jenkins-cli.jar -s http://localhost:8081/ install-plugin ant.hpi -deploy -restart
  
  Exception in thread "main" java.io.IOException: No X-Jenkins-CLI2-Port among [null, X-Required-Permission, X-Jenkins,
  X-You-Are-In-Group, X-Hudson, Content-Length, Expires, X-You-Are-Authenticated-As, X-Permission-Implied-By, Set-Cookie,
  Server, X-Content-Type-Options, Date, X-Jenkins-Session, Content-Type]
          at hudson.cli.CLI.getCliTcpPort(CLI.java:290)
          at hudson.cli.CLI.&lt;init&gt;(CLI.java:133)
          at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)
          at hudson.cli.CLI._main(CLI.java:474)
          at hudson.cli.CLI.main(CLI.java:389)
          Suppressed: java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8081/cli
                  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
                  at hudson.cli.FullDuplexHttpStream.&lt;init&gt;(FullDuplexHttpStream.java:78)
                  at hudson.cli.CLI.connectViaHttp(CLI.java:163)
                  at hudson.cli.CLI.&lt;init&gt;(CLI.java:137)
                  ... 3 more
  </code></pre>
  
  <ol>
  <li>I have installed Jenkins as a Windows Installer</li>
  <li>Windows service started</li>
  <li>Then I copied jenkins-cli.jar to the jenkins folder</li>
  <li>ant.hpi file is located at jenkins folder itself (I also copied to different drive and gave the absolute path during installation)</li>
  <li>Enter the command to install plugin which resulted in error as shown above</li>
  </ol>