卷曲不适用于詹金斯的工作

时间:2018-04-18 16:08:26

标签: windows http ssl curl jenkins

我正在尝试从主机Jenkins服务器触发远程Jenkins作业。

我已经创建了构建令牌。我试图用curl调用这个工作

curl.exe -v -x -K --insecure -u "username@username.com:pwd" POST https://hostname:8443/job/mypackjob/build?token=XXXIODFASDF

如果从命令提示符(即Windows CMD)使用相同的命令,则作业将被触发,但是从Jenkins作业中它无效。我收到HTTP / 1.1错误。

* Rebuilt URL to: POST/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Could not resolve host: POST
* Closing connection 0
curl: (6) Could not resolve host: POST

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 132.186.32.5...
* TCP_NODELAY set
* Connected to INCHNIISNW0113.net (132.186.32.5) port 8443 (#1)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
} [5 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.2 (IN), TLS handshake, Server hello (2):
{ [85 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [1580 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [333 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [70 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
{ [1 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: CN=INCHNIISNW0113.net
*  start date: Nov  3 13:41:11 2016 GMT
*  expire date: Dec 31 23:59:59 2039 GMT
*  issuer: CN=API
*  SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.
* Server auth using Basic with user 'username@xxx.com'
} [5 bytes data]
> -K /job/2.50HR0API0Obfuscation/build?token=TRIGGERMEHRAPIBUILD HTTP/1.0

> Host: INCHNIISNW0113.net:8443

> Authorization: Basic **************

> User-Agent: curl/7.58.0

> Accept: */*

> 


  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0{ [5 bytes data]
**< HTTP/1.1 404 Not Found**

< Date: Wed, 18 Apr 2018 15:46:23 GMT

< X-Content-Type-Options: nosniff

< Server: Jetty(9.4.z-SNAPSHOT)

* no chunk, no close, no size. Assume close to signal end
< 


  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0{ [5 bytes data]
* TLSv1.2 (IN), TLS alert, Client hello (1):
{ [2 bytes data]

  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
* Closing connection 1
} [5 bytes data]
* TLSv1.2 (OUT), TLS alert, Client hello (1):
} [2 bytes data]

0 个答案:

没有答案