jenkins installation windows 10 "Service Logon Credentials" - jenkins

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.
if I use the username and password of my Windows account(with administrator privileges) the following information is displayed:

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:
Logon to the computer with administrative privileges.
Open the ‘Administrative Tools’ and open the ‘Local Security Policy’
Expand ‘Local Policy’ and click on ‘User Rights Assignment’
In the right pane, right-click ‘Log on as a service’ and select properties.
Click on the ‘Add User or Group…’ button to add the new user.
In the ‘Select Users or Groups’ dialogue, find the user you wish to enter and click ‘OK’
Click ‘OK’ in the ‘Log on as a service Properties’ to save changes.
Then try again with the added user.
(Source)

Below solution worked for me on Windows10.
Select Logon Type = Run Service as Local System ,click Install and complete the setup
To unlock Jenkins, Go to C:\Program Files\Jenkins and open jenkins.err
Get Administrator password ,paste and Install suggested plugins.
Create first admin user and start using Jenkins

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'.

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",

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.

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 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)

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.

Related

Install Jenkins on windows with service account

I am trying to install Jenkins on Windows 10. When I run the windows installer, it asks for a user account. Which account is that? I create an account in Jenkins but when I do test connection, it says "User name and/or password incorrect".
Can someone please help me here?
Thanks!
If you are on Windows 10 what you can do is:
use the window search bar to search for Local Security Policy and open it.
Click on Local Policies
Click on User Rights Assignment
By the right side showing the policies, open Logon as a service
Click on Add User or Group button.
In the input part written enter the object name, input the account name you created that you want to change to a service account.
Once you have inputed it, click on Check Name to verify.
finally click ok and you are good to go, you can now use the account while installing Jenkins.
Based on your question, following is what I am guessing,
If you are installing Jenkins from an installer and it asks for windows username/password, then your login might need higher privilege(Administrator) rights to install further.
If the installation is successful, then initial username is "admin" and password could be located at,
$JENKINS_HOME/secrets/initialAdminPassword
cat /var/lib/jenkins/secrets/initialAdminPassword
Check these links - ubuntu, windows
I suppose you got the error when you tried to install Jenkins and selected Logon Type Run as service as local or domain user.
If so, I ran into the same problem. I solved it by creating a new user on windows.
Type Add, edit or remove other users and double klick it
In the new dialog under Other users select Add someone else to this PC
Click on I don't have this person's sign-in information
Click on Add a user without a Microsoft account
Enter username and password
Enter the new credentials into Jenkins installer dialog
Refer to my anwser to a similar question. It is asking for a Windows account with "Log on as a service" permission. This is the account Jenkins app will run under.
These steps helped for me:
Download the latest Jenkins war from https://www.jenkins.io/download/
Keep it program files folder (e.g. C:\Program Files (x86)\Jenkins)
Start Jenkins (java -jar jenkins.war)
Check console.
Now stop this Jenkins instance (Cntrl +C)
In "Services", find the Jenkins and set the credentials one more time in the "Logon" tab. Save changes.
Now start the old instance through service, it should start normally and old jobs should appear at the console.

Nuget prompting credentials

I am using Visual Studio 2019. While building a solution its asking for credentials and build is getting failed. api.nuget.org asking username and password.
Note: I am using public default nuget package
ZScalar is installed in my system. This was blocking the nuget uri. Hence, the nuget was prompting for credentials. If i use proxy, it didn't prompt for credentials.
From the official thread of Visual Studio's developer community, you should consider signing out from all accounts (located on the top-right corner of Visual Studio). This should solve your issue.
After clicking on your profile, go to Account settings... and you'll be prompted this:
Simply remove all the accounts & enjoy!
Note that this problem has a good chance to be related wtih NuGet packages installation permission.
The answer here, for me, was the blocking of downloadable executable files by group policy.
.nupkg was classified as executable or just not whitelisted - so a group policy (company enforced internet setting) is what was causing the 403 error (on the command line) and this password prompt to nuget.api.org
The password prompt doesn't really make any sense, in my context, but I suppose if I was a network admin and I entered my network password, it might have worked.

Connecting to Team Foundation Server with a pc with no AD

So we currently have a TFS 2015 server on premise installation.
All users are registered using Active Directory account.
PC connecting to the web portal that are using AD accounts are automatically logged in since it detects the current logged in user.
My problem is we have devices that are not in AD. E.G. personal laptops that sometimes view the portal to check work items and such.
You can type in your uname and password to log in but the problem is TFS keeps asking for the uname and password every 2 minutes or so making it tedious to do anything.
Do you have any solution to this problem?
On Windows, you simply add the user and password to the Credential Manager (Control Panel\All Control Panel Items\Credential Manager) in the Windows Credential tab.
Make sure you use a recent version of Git for Windows which includes the proper Git credential manager.

TFS connection using Azure Active Directory account

So for years I've been logging into my PC using a basic Windows Live account and then using RUNAS.exe to use my AD account when launching Visual Studio and SSMS and everything worked ok. I decided to move to an AD login on my laptop so that I don't need to do the RUNAS.exe for anything I want to use my AD credentials.
Got my user setup fine, and SSMS works without a hitch. The problem is TFS and the Security Device Credential PIN. My org has it set that I have to set a Windows Hello PIN when setting up. If I login to my laptop using that option, I basically can't connect to TFS. If I use my password, I have better luck.
If I use Edge to browse to my TFS server, I'm prompted for a login and by default it asks for my Security Device Credential (PIN). It accepts it, but Edge cannot connect to the site. If I launch and using 'Other Options' and retype my account and password, it works no problem.
This is crazy. Any ideas why this would be this way? I've looked and cannot find any answers on this.
I appreciate any help!

When I install TFS 2010 what is the standard user name and password at /tfs?

I just installed TFS 2010. When I go to machine-name:8080/tfs on my web browser it asks for a user name and password. What is the standard user name and password? How do I set this?
It should accept all username/password combinations which are valid on the machine running TFS.
There is no default password thing. (could be that default installation only allows administrative login)
See MSDN for further information on configuring TFS 2010:
http://msdn.microsoft.com/en-us/library/ms252477.aspx
In My case it was all about firewall configuration, let me tell you what I was dealing with:
I checked out windows firewall and I saw that there was an exception for TFS But it was not enough, why? See following image:
As you can see, TFS has been excepted but not for Public
So you can tick the check box for Public or you can change your network location from Public to Home or Work, go to: Control Panel > Network and Sharing Center
Change Your network Location
Now you can simply use those Windows accounts you have and it will be accepted definitely.
Overview: What was default Username and Password again?
Assumption: You are using TFS in local network, Your own server your own client!
Short answer: As a simplest method, you should create a windows account, introduce it in TFS to grant permissions, then you can login by that account from wherever in your local network.
Long Answer:
Step1: Create one or more windows account(s), to do that, go to control panel -> User accounts -> manage another account (Create another account while you can use the account you already have) -> Create a new account ->Give it a name
Probably you may need to select administrator
Then select created account -> Create a password
Step 2:
Go to Web Portal for VS TFS 2015, click on team members (or click on the gear icon in the above bar, and go to security tab) Add -> Add windows user or group -> Browse for account you already created or simply type it to add it.
Step 3:
Go to web portal for Visual Studio Team Foundation Server 2015, through web browser by some address like http://user-pc:8080/tfs (which you can find it in your VS or TFS) just like
then you encounter a dialog box which asks you for username and password, give the credential it asks based on windows account you have created, if everything is OK and no problem with firewall it's done.
Finally:
You might see multiple users in windows welcome screen which seems annoying, to prevent windows from showing them in the welcome screen
Go to Computer -> Manage -> Local Users and Groups -> Users
double click on each one of them and remove their member of data (which is set to Users by default)
Thanks to THIS
There is none. Log in as admin on the machine. Then create a new project group etc. Define admins there (Domain integrated). Their usernames / paswords will work then.

Resources