80

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

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Przemek K
  • 843
  • 1
  • 5
  • 6
  • Please see [similar question](https://stackoverflow.com/a/63543810/598141). Can't mark a duplicate since ithas not been answered. – Ian W Aug 23 '20 at 22:22

8 Answers8

161

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

Gerold Broser
  • 14,080
  • 5
  • 48
  • 107
Chanaka Karunarathne
  • 1,936
  • 2
  • 16
  • 14
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
Alka
  • 163
  • 1
  • 10
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'.

Mujahidul Islam
  • 265
  • 4
  • 8
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

Karthik H
  • 1,267
  • 12
  • 13
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.

Ken
  • 1,234
  • 10
  • 16
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 :) )

elysium
  • 43
  • 7
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)

crakama
  • 759
  • 11
  • 25
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