【问题标题】:Unable to connect to JIRA over HTTPS server using the Perl JIRA::Client::Automated无法使用 Perl JIRA::Client::Automated 通过 HTTPS 服务器连接到 JIRA
【发布时间】:2016-04-26 15:02:47
【问题描述】:

我不使用代理。

这是我的代码:

use JIRA::Client::Automated;
my $jira = JIRA::Client::Automated->new(https://myserver.com, "user", "password");

而错误响应是:

无法获取 /jira/rest/api/latest/issue/DCS-51191:500 无法连接 到 myserver.com:443 无法连接到 myserver.com:443

错误的文件描述符在 C:/Users/Fred/applis_portables/Strawberry_Perl/perl/vendor/lib/LWP/Protocol/http.pm 第 47 行。

在 createPage2.pl 第 16 行。

感谢您的帮助。

【问题讨论】:

    标签: perl rest https jira


    【解决方案1】:

    似乎 JIRA 服务器上有一个自签名证书。为了绕过,我添加了以下代码:

    我的 $jira_ua = $jira->ua(); $jira_ua->ssl_opts(verify_hostname => 0);

    【讨论】:

      【解决方案2】:

      该错误看起来不像 JIRA::Client::Automated 错误。它由 LWP::UserAgent 生成,通常表示所显示的内容。

      您的服务器上有自签名证书吗?

      您是否尝试在浏览器中打开该 URL? https://myserver.com:443(就像您将其提供给模块一样)。

      尝试使用 来自您的网络服务器的 curlcurl -vvv https://myserver.com/jira/rest/api/latest/issue/DCS-51191

      也许只是您的服务器 URL 中缺少 www. 前缀?

      【讨论】:

      • 感谢您的回复。我不知道服务器上是否有自签名证书(服务器由 IT 团队管理)。当我在浏览器中打开 URL 时,会显示我的 JIRA 仪表板。 curl 命令显示: curl: (60) SSL 证书问题:证书链中的自签名证书更多详细信息:curl.haxx.se/docs/sslcerts.html
      • 你发现了你的问题 :) 在 JIRA::Client::Automated 中可能无法解决。
      猜你喜欢
      • 1970-01-01
      • 2017-06-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-19
      • 1970-01-01
      相关资源
      最近更新 更多