Jenkins无法连接到ldaps:// server

时间:2015-03-17 21:56:58

标签: java ssl jenkins ldap

我试图将Jenkins连接到LDAP服务器。我在Jenkins上设置了配置,但是我收到了他的消息:

  

无法连接到ldaps://ldap.my.server.com:javax.naming.CommunicationException:简单绑定失败:ldap.my.server.com:636 [根异常是javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径]

我知道是因为我的SSL证书是自签名的,但是,有什么方法我可以在jenkins中忽略它吗?

2 个答案:

答案 0 :(得分:1)

您的信任库不信任服务器证书。如果它是自签名的,您需要从服务器导出它并将其导入您的客户端信任库。更好的是,让它签名。

答案 1 :(得分:-1)

Have you considered skipping certificate validation altogether? Here's a piece of code I found some time ago while wrapping my head around the same problem:

<script type="text/javascript"> 
$(document).ready(function(){ 
    $(window).scroll(function(){
        var WindowHeight = $(window).height(); 
        //if($(window).scrollTop()+700 >= $(document).height() - WindowHeight)
        if ($(window).scrollTop() >= ($(document).height() - $(window).height())*0.7){ 
            $("#loader").html("<img src='http://www.niharonline.com/photo/ajax-loader.gif' alt='loading'/>");
            var LastDiv = $(".as_country_container:last"); 
            var LastId  = $(".as_country_container:last").attr("id"); 
            var ValueToPass = "lastid="+LastId;             
            $.ajax({ 
                type: "POST",
                url: "http://www.niharonline.com/photo/getdata.php",
                data: ValueToPass,
                cache: true,           `enter code here`
                success: function(html){             
                    if(html){
                        LastDiv.after(html);          
                        $('.columns-block').masonry('reload');
                    }
                }
            });
        return false;
        }
    return false;
    });
});
</script>

Hope this will help

相关问题