Can't find config.xml anywhere within Jenkins folder

为君一笑 提交于 2020-01-01 17:12:02

问题


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?


回答1:


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.




回答2:


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




回答3:


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




回答4:


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


来源:https://stackoverflow.com/questions/32565275/cant-find-config-xml-anywhere-within-jenkins-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!