无法使用cli

时间:2016-10-28 15:53:18

标签: windows jenkins jenkins-plugins windows-server-2012-r2 jenkins-cli

运行Server 2012 R2,Jenkins ver。 2.19.1

通过Windows MSI安装Jenkins

我似乎无法使用cli安装插件:

& 'C:\Program Files (x86)\Jenkins\jre\bin\java.exe' -jar 'C:\Program Files (x86)\Jenkins\war\WEB-INF\jenkins-cli.jar' -s 'http://localhost:8080/' install-plugin 'http://updates.jenkins-ci.org/download/plugins/aws-la
mbda/0.5.5/aws-lambda.hpi'

java.io.IOException: No X-Jenkins-CLI2-Port among [X-Jenkins, null, Server, X-Content-Type-Options, X-You-Are-In-Group, X-Hudson, Date, X-Jenkins-Session, X-You-Are-Authenticated-As, X-Required-Permission, Set-Cookie, Expires, Content-Length, Content
-Type]
        at hudson.cli.CLI.getCliTcpPort(CLI.java:284)
        at hudson.cli.CLI.<init>(CLI.java:128)
        at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)
        at hudson.cli.CLI._main(CLI.java:473)
        at hudson.cli.CLI.main(CLI.java:384)
        Suppressed: java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/cli
                at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
                at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
                at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:78)
                at hudson.cli.CLI.connectViaHttp(CLI.java:152)
                at hudson.cli.CLI.<init>(CLI.java:132)
                ... 3 more

我最后也用-name aws-lambdaaws-lambda进行了尝试,但没有效果

1 个答案:

答案 0 :(得分:0)

许可问题。要么提供SSH身份验证,要么确保Anonymous具有安装插件的权限。

祝你好运!