83

I don't know Jenkins at all. I want to install Jenkins on Windows 10. I downloaded the installer and ran it, but I have a problem. I don't know what to enter in the "Account" and "Password" fields on the "Service Logon Credentials" stage.

Screen  of where I got stuck - Service Logon Credentials

if I use the username and password of my Windows account(with administrator privileges) the following information is displayed:

Test Credentials information

1
  • Please see similar question. Can't mark a duplicate since ithas not been answered.
    – Ian W
    Aug 23, 2020 at 22:22

8 Answers 8

167

When installing a service to run under a domain user account, the account must have the right to logon as a service. This logon permission applies strictly to the local computer and must be granted in the Local Security Policy.

Perform the following to edit the Local Security Policy of the computer you want to define the ‘logon as a service’ permission:

  1. Logon to the computer with administrative privileges.
  2. Open the Administrative Tools and open the Local Security Policy
  3. If the Local Security Policy is missing in your system, refer to the answer in the Where to download GPEdit.msc for Windows 10 Home? question on Microsoft Community to troubleshoot
  4. Expand Local Policy [Note: it's ... Policies on Win Server] and click on User Rights Assignment
  5. In the right pane, right-click Log on as a service and select properties.
  6. Click on the Add User or Group… button to add the new user.
  7. In the Select Users or Groups dialogue, find the user you wish to enter and click OK
  8. Click OK in the Log on as a service Properties to save changes.

Then try again with the added user.

Jenkins User Handbook > Windows > Invalid service logon credentials

13
  • 2
    Thank you it worked for me as well. Using the same steps I edited the Group service policy.
    – zara
    Oct 27, 2020 at 14:26
  • 1
    I followed these steps but Jenkins still said the password/user was incorrect, only solution i found was to install with the not recommended option
    – Benoit F
    Mar 3, 2021 at 10:22
  • 3
    @ChanakaKarunarathne Any idea on what setting will help on Windows 10 Home as it does not contain local security policy settings.
    – Ravi Bhatt
    Apr 24, 2021 at 15:07
  • 2
    @RaviBhatt This might help.. majorgeeks.com/content/page/… Apr 27, 2021 at 18:09
  • failed for me with latest msi today.
    – Ray Tayek
    May 17, 2021 at 20:01
10

Below solution worked for me on Windows10.

  1. Select Logon Type = Run Service as Local System ,click Install and complete the setup
  2. To unlock Jenkins, Go to C:\Program Files\Jenkins and open jenkins.err
  3. Get Administrator password ,paste and Install suggested plugins.
  4. Create first admin user and start using Jenkins
5

Follow Chanaka Karunarathne's answer, just in the 'enter the object name to select' section enter your PC's user name. If you do not know what is your user name then just open a command prompt and run 'whoami'.

4

I followed this procedure to install Jenkins and it worked like a charm,

https://www.youtube.com/watch?v=1_Zs0gQq1Yc

Step1: Download the "jenkins.war" file.

Step 2: Run this command java -jar jenkins.war

Step 3: Copy the secret that you get from this location,

C:\Program Files (x86)\Jenkins\secrets\initialAdminPassword

Use this Key when prompted to "Unlock Jenkins", enter image description here

2

If you are a windows 10 home user, you need to download and install GPEdit.msc in Windows 10 Home using PowerShell script before you can use "Local Security Policy". you can download it from here.

0

I was be able to follow https://stackoverflow.com/users/4309588/chanaka-karunarathne's suggestion, but when it went to the next step, I tried to enter my "admin"(aka laptop login credentials), in my case I usually login with the 4-digit code to my Windows; and even if I use the password associated with the account, it would be my email as username and it's windows password as password, but I have setup two-step authentication for my email as well. it would not work.

I ended up username + 4 digit pass-code would not work on this username(email address) + password would not work as well (due to the MFA)

I don't know why it had to be this difficult to login to Jenkins (or not sure if I should be upset about myself for setting up MFA for my email :) )

1
  • You shouldn't like the user but the suggestion.
    – Jin Kwon
    Aug 30, 2021 at 8:44
0

@elysium You can solve such problem by switching from Microsoft Account to Local Account for your computer. On assuming that your computer is similar to mine, you can navigate as follows;

Press/Click the Microsoft Windows tab on your keyboard. Navigate to your profile picture and click on "Change Account Settings" Navigate to Log in with Local Account instead and make the switch from Microsoft Account to Local Account.

Follow @Chanaka Karunarathne 's instructions. If you cannot find Local Security Policy, Go to search and type winver to confirm if you are using either of this OS versions ; Windows 10 Pro, Windows 10 Education, Windows 10 Pro Edu, Windows 10 Enterprise, Windows 10 Pro Workstation) otherwise Windows 10 Home lucks Local Security Policy, atleast for my case.

Alternatively, as mentioned in some previous comments here, to enable Group policy in Windows 10 Home, download a from here, right click on it run as administrator. Press Window Key + R, type gpedit.msc to check if Group policy has been enabled as described in this majorgeeks youtube channel (https://www.youtube.com/watch?v=7wkgwEhtqdI&ab_channel=majorgeeks)

0

In Windows 11, I am getting the same error even though provided user and password are correct. So I have installed Jenkins as LocalSystem.

After completion of installation, I changed it from the services and it worked for me. enter image description here

1
  • Where do we get the password for the Jenkins Properties field? Dec 6, 2022 at 5:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.