Can't find config.xml anywhere within Jenkins folder
Asked Answered
F

8

5

I have downloaded and installed Tomcat servlet on my Windows 8...

Inside which many application's .war files are present. Also Jenkins. I was able to start it and create jobs and plugins through it. But I gave a wrong credentials for Advanced -> plugin -> HTTP Proxy while installing Maven. Maybe this is what is blocking me to login and gives message: Admin Is Missing the Overall/Read Permission.

I searched in Jenkins and many other sites; hey had mentioned to follow these steps...

  1. Stop Jenkins (the easiest way to do this is to kill the servlet container.)
  2. Go to $JENKINS_HOME in the file system and find config.xml file.
  3. Open this file in the editor.
  4. Look for the <useSecurity>true</useSecurity> element in this file and replace true with false
  5. Remove the elements authorizationStrategy and securityRealm.
  6. Start Jenkins

But I searched everywhere to find the config.xml on Windows, but I can't find it. Where it is?

Fanny answered 14/9, 2015 at 12:50 Comment(3)
Maybe your config files is in a system folder like: C:\Users\YOUR_USER\.jenkins. Try to change your Windows explorer settings to view these folders.Hewart
By default Jenkins uses ~/.jenkins directory as JENKINS_HOME. In your case please open home directory of user which runs Jenkins and find .jenkins folder. It should be C:\Users\USER_NAME\.jenkins. Please refer following link for more information wiki.jenkins-ci.org/display/JENKINS/Administering+JenkinsKenzie
I have a similar issue. I'm locked out of jenkins and I even can't reinstall it because the old settings remainRoup
C
6

In Windows 7 I've had the same problem and after looking I found that the config file is in two different folders:

  • C:\Users\user name\\.jenkins
  • C:\Windows\System32\config\systemprofile\\.jenkins

changing the first one didn't do much, but deleting the second did the job.

Charland answered 28/6, 2016 at 11:41 Comment(0)
D
3

By default Jenkins home directory (JENKINS_HOME) is set to ~/.jenkins, this is the location where you can find your Jenkins XML config file.

On Windows your user home directory is under C:\Users\USERNAME (equivalent to %HOME%). This folder may be hidden (since it has dot in it), so when browsing the files, make sure your program shows hidden files or type the direct path in your Path/Address bar.

Here is the brief structure of XML files within Jenkins home folder:

JENKINS_HOME
 +- config.xml     (jenkins root configuration)
 +- *.xml          (other site-wide configuration files)
 +- jobs
     +- [JOBNAME]      (sub directory for each job)
         +- config.xml     (job configuration file)

See: Administering Jenkins - JENKINS_HOME directory

Deadwood answered 10/7, 2016 at 13:35 Comment(0)
S
3

you could found it under :

C:\ProgramData\Jenkins\.jenkins

FYI : you could check your "JENKINS_HOME" under C:\Program Files\Jenkins inside the file jenkins.xml you will find the path

Scalenus answered 6/3, 2022 at 14:26 Comment(1)
Thank you, Mine was the same. <env name="JENKINS_HOME" value="%ProgramData%\Jenkins\.jenkins"/>Altis
P
2

It's not depend on Win OS or Environment variables (I.e - %HOME% OR JENKINS_HOME)

You can find the confing.xml file where it's installed. It can be in one of the following paths:

  • C:\Program Files\Jenkins
  • C:\Program Files (x86)\Jenkis
Popliteal answered 9/12, 2018 at 8:30 Comment(0)
N
2

on windows, it can be found here

c:\windows\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins

Nasty answered 25/4, 2021 at 12:27 Comment(0)
R
1

Right now I was facing this issue, after trying multiple solutions. The best solution is to simply paste this path on explorer

"C:\ProgramData\Jenkins"

Note: Usually program data is hidden folder, that's why it will not be visible, so you need to type the path

Recognizor answered 31/8, 2022 at 21:22 Comment(0)
C
0

If not done, try defining JENKINS_HOME in setclasspath.sh. bounce tomcat, config.xml will be in you JENKINS_HOME.

Currie answered 10/7, 2016 at 13:33 Comment(0)
K
0

.jenkins is a hidden folder, hence you will not find it by regular searching. Mostly it can be found in the username folder (Mac OS) and find ultimately the config.xml under the .jenkins folder. If you don't want to use any login credentials at localhost, change <useSecurity>true</useSecurity> into <useSecurity>false</useSecurity>

Klingel answered 5/5 at 3:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.