Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I set up Jenkins CI to use https on Windows?

We've recently set up a Jenkins CI server on Windows. Now in order to use Active Directory authentication I'd like to require https (SSL/TLS) for access. Given this setup, what is the recommended way to do this?

like image 264
Nick Jones Avatar asked Mar 15 '11 15:03

Nick Jones


People also ask

How do I configure HTTPS?

To configure an HTTPS server, the ssl parameter must be enabled on listening sockets in the server block, and the locations of the server certificate and private key files should be specified: server { listen 443 ssl; server_name www.example.com; ssl_certificate www. example.com. crt; ssl_certificate_key www.

How do I add a self signed certificate to Jenkins?

Let's make a folder inside /var/lib/jenkins to put our cert and key in. Now we need to edit the Jenkin config to tell it to use HTTPS and where the certificate and key are located. For those who use Ubuntu, this is /etc/default/jenkins .


1 Answers

Go to your %JENKINS_HOME% and modify the jenkins.xml. Where you see --httpPort=8080 change it to --httpPort=-1 --httpsPort=8080 you can make the ports anything you want of course, but in my testing (a while ago, it may have changed) if you don't keep --httpPort=<something> then Jenkins will always use 8080. So if you simply change --httpPort=8080 to --httpsPort=8080, port 8080 will still use http.

Also, if you want to use your own certificate, there are some instructions at the bottom of this page.

http://wiki.jenkins-ci.org/display/JENKINS/Starting+and+Accessing+Jenkins

like image 81
aflat Avatar answered Sep 24 '22 01:09

aflat