I don't have access to both servers so cli is not an option only jenkins ui is available. I need to import jobs using job import plugin but i am unable to figure how to configure the plugin so as to import jobs. Could anyone please help me with this.
3 Answers
To configure the Jenkins Remote Plugin, you need to add a Jenkins Server to import your jobs.
Setting up a Jenkins Server
To add a Jenkins Server, you need to go to your Jenkins configuration: Manage Jenkins > Configure System > Job Import Plugin or http://jenkins-host:port/configure and add the URL and credentials to the host from which you will import the jobs.

If you don't have credentials, you'll need to add them to this server. To do this, click on the Add option below the URL settings.

Using the Jenkins Import Plugin
After setting up a Jenkins server, you will be able to use the Jenkins Import plugin by going to the Job Import Plugin option on the Jenkins home page or by navigating to the URL: http://jenkins-host:port/Job-import/ or http://jenkins-host:port/job-import/ in newer versions.
If you added only one Jenkins Server, it will be selected by default. Otherwise, you'll need to select the correct Jenkins server:

Normally, you don't need to set the Remote folder or Search into folders options, so if you use the default Jenkins settings, leave these fields blank.
Then, click on the Query! button to start your import. A page with all jobs available for import will be shown.
You'll need to select all the jobs you want to import one by one. If you have many jobs (like in my case), this can be a bit tedious. It's a good idea to select the Install required plugins option as well.

After selecting everything, you can click on the Import! button to finally start your import.
7 Comments
/var/log/jenkins/jenkins.log. For more information about the Jenkins logging take a look on wiki.jenkins.io/plugins/servlet/…In my case, I was getting below error (401 Unauthorized) the username:password configuration worked only after setting a new API token on a the source jenkins instance and using it as 'password' in the target instance credentials. Pretty much all other answers cover the configuration of the plugin.
Failed to list job from remote http://{remoteIP}:8080/. Response status code received 401. Content: <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 401 Unauthorized</title> </head> <body><h2>HTTP ERROR 401 Unauthorized</h2> <table> <tr><th>URI:</th><td>/api/xml</td></tr> <tr><th>STATUS:</th><td>401</td></tr> <tr><th>MESSAGE:</th><td>Unauthorized</td></tr> <tr><th>SERVLET:</th><td>Stapler</td></tr> </table> <hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.45.v20220203</a><hr/> </body> </html> Also if wondering where to check logs, it's http://<your_jenkins_ip/domain>:8080/logs/all
1 Comment
Follow below steps to import jobs using UI -
You need to install job import plugin on the server where you need to import jobs to.
Then go to the plugin displayed on left side of jenkins.
Enter url and authentication and jobs will be listed of remote server.
Select the jobs to be copied and done. Jenkins will copy the jobs to your server.