Our team has a hudson instance. Multiple users use it. However, even though a user checks the 'Keep me signed in' checkbox on the sign-in ("Welcome to Jenkins") page, it still asks at every new launch of that link.
I am the admin of the hudson server. Is there a way I can disable this so that the users who use the hudson instance aren't inconvenienced with logging in everytime once they have selected the 'Keep me signed in' checkbox on the sign-in page?
When we migrated our Jenkins server, users started complaining about a similar issue. It turned out that the default session timeout was low (30 minutes).
You can check your default timeout:
import org.kohsuke.stapler.Stapler;
Stapler.getCurrentRequest().getSession().getMaxInactiveInterval() / 60
Change the timeout (steps for Ubuntu).
Edit the file /etc/default/jenkins with the settings below and reboot the machine.
2.1. Add variable session timeout (in minutes).
SESSION_TIMEOUT=660
2.2. The new variable should be included in JENKINS_ARGS:
JENKINS_ARGS="--webroot=/var/cache/$NAME/war --httpPort=$HTTP_PORT --httpListenAddress=$HTTP_HOST --sessionTimeout=$SESSION_TIMEOUT"
You can see also:
Increase the Jenkins login timeout
Related
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.
I am using hudson 3.3.3 and have just moved my hudson server to a new server and after movement. But i am not able to login to new hudson server. When i give my login credentials, hudson logs shows me successful login:
hudson.plugins.parameterizedtrigger.TriggerBuilder.perform(TriggerBuilder.java:125)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:34)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:736)
at hudson.model.Build$RunnerImpl.build(Build.java:181)
at hudson.model.Build$RunnerImpl.doRun(Build.java:136)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:524)
at hudson.model.Run.run(Run.java:1495)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:82)
at hudson.model.Executor.run(Executor.java:137)
Apr 12, 2018 5:19:02 PM hudson.security.AuthenticationProcessingFilter2 successfulAuthentication
INFO: Login attempt successful for user
But the screen still shows login option on top right and not getting "Manage Hudson" option. I added anonymous user as admin in hudson-security.xml file and after restart i am able to see "Manage Hudson" option without login. So admin access is open for each user at this time. How can i solve this as security risk is too high with everyone having admin access :(
I assume that you have moved all needed plugins, secrets folder and users folder from your old server. I assume that you have used the initial admin password to unlock the new Jenkins server.
I suspect that after you login, there could be redirect, please double check the URL before and after the login.
There could be DNS issue. If the Jenkins URL is the same for the new and the old server try to login by IP.
Double check configurations, for example if you are using nginx as reverse proxy.
I try to check code-push.
I use Cordova into a docker machine into a virtual machine, in Windows.
My problem is that when I try to create an account with "code-push register", I get "A browser is being launched to authenticate your account...". This doesn't help me at all because this runs into a docker machine and no browser can start.
What can I do?
It could help me if I could link a Microsoft account.
Thanks in advance
You can use following commands to be able to authenticate against the CodePush service without launching a browser and/or without needing to use your GitHub and/or Microsoft credentials (e.g. in a CI environment),
code-push access-key add "VSTS Integration"
By default, access keys expire in 60 days. You can specify a different expiry duration by using the --ttl option and passing in a human readable duration string (e.g. "2d" => 2 days, "1h 15 min" => 1 hour and 15 minutes). For security, the key will only be shown once on creation, so remember to save it somewhere if needed!
After creating the new key, you can specify its value using the --accessKey flag of the login command, which allows you to perform "headless" authentication, as opposed to launching a browser.
code-push login --accessKey <accessKey>
if at any point you need to change a key's name and/or expiration date, you can use the following command:
code-push access-key patch <accessKeyName> --name "new name" --ttl 10d
I finally did the obvious: installed code-push on Windows, performed 'code-push login'. Then the browser opened and after I inserted microsoft login credentials I got the access token to use into Docker.
How can i solve session timeout problem, I am monitoring my project status through "Status Monitor Plugin" and I used jenkins auto refresh plugin , more than 5 auto refresh plugin in mozilla but it no one worked for me . Is there any suggestion?
Under "Configure Global Security" there is a checkbox named "Enable Single SignOut" whenever the user logs out of CAS (e.g. when logging out of another CAS-enabled application), the corresponding Jenkins session will be destroyed and the local user logged out as well.
I tried to enable Jenkins CI security according to instructions in the wiki (the “Initial Steps” part). When I save the configuration, the browser asks me for some credentials, but since I haven't set any yet there is no way to get in to create a new user account (according the page above) and as a result I'm getting
Status Code: 401, Exception: Bad credentials
To get back into Jenkins, look at this page: Help! I Locked Myself Out.
To prevent what happened from happening again, I have always found it easiest to enable the security (I'm not sure which method you set), and then add my own user with the "Add" button.
I had the same problem using Chrome on Linux and getting locked out every time by
an auth popup as soon as I saved the security settings.
I found that using either a Chrome "Incognito Window" or Firefox worked Ok.