Jenkins Auto Login

Jenkins Auto Login

Jenkins is a very useful and highly configurable CI system used by most developers at some point in their working lives. For the most part it is excellent but the one thing that I find very annoying is having to login every time I open my Jenkins interface in my browser. 

To this end and to save those valuable seconds when you are busy I have created a login script for tampermonkey so when you are logged out of your Jenkins you will be automatically logged strait back in and this includes when you open it up on a clean browser instance. 

To use this just install the tampermonkey chrome extension and install this script. You will have to edit it slightly to add your username and password and the URL to match but after this you should never have to deal with logging in yourself again. 


// ==UserScript==
// @name       Jenkins auto login.
// @namespace
// @version    0.1
// @description  Automatically loggs you in to jenkins
// @match      http://my-jenkins.url/login
// @copyright  2012+, Tom Gould
// @require
// @grant GM_addStyle
// ==/UserScript==
var jenkinslogin = function () {
window.setInterval(jenkinslogin, 1000);



$('input[name="j_username"]') is always null when I use the script, hence it doesn't work.

(in the DOM there's indeed a table containing <input type="text" name="j_username" id="j_username"> but it won't work.

Did you replace the user name and password values in the script ?

Something like :



I works just fine when chrome is started "normally", but not when started with "--kiosk" mode.

Not sure if extensions are disabled then or not..


Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.