API tocken is ok and still get following error
jenkins-jobs --allow-empty-variables --conf ../../../jenkins_conf/upstream.conf
test . ovirt-node-ng__build-artifacts
Traceback (most recent call last):
File "/usr/bin/jenkins-jobs", line 10, in <module>
sys.exit(main())
File "/usr/lib/python2.7/site-packages/jenkins_jobs/cmd.py", line 179, in
main
execute(options, config)
File "/usr/lib/python2.7/site-packages/jenkins_jobs/cmd.py", line 351, in
execute
n_workers=1)
File "/usr/lib/python2.7/site-packages/jenkins_jobs/builder.py", line
333, in update_jobs
self.load_files(input_fn)
File "/usr/lib/python2.7/site-packages/jenkins_jobs/builder.py", line
230, in load_files
self.parser = YamlParser(self.global_config, self.plugins_list)
File "/usr/lib/python2.7/site-packages/jenkins_jobs/builder.py", line
226, in plugins_list
self._plugins_list = self.jenkins.get_plugins_info()
File "/usr/lib/python2.7/site-packages/jenkins_jobs/builder.py", line
190, in get_plugins_info
raise e
jenkins.JenkinsException: Error in request. Possibly authentication
failed [403]: Forbidden
INFO:jenkins_jobs.builder:Cache saved
–
Eyal Edri
Associate Manager
RHV DevOps
EMEA ENG Virtualization R&D
Red Hat Israel
phone: +972-9-7692018
irc: eedri (on #tlv #rhev-dev #rhev-integ)
Should not be directly related as jjb uses Jenkins API which is core functionality. What's the user and jjb version that you are using? I fetched the source code to check how jjb requests plugin info to try and reproduce it directly. Logs revealed no info so far.
I just tested the ... function against Jenkins successfully with the following versions:
python-jenkins 0.4.11
jenkins-job-builder 1.4.0
The test script was as simple as this and it worked properly:
import jenkins
server = jenkins.Jenkins(url='http://jenkins.ovirt.org', username='ederevea', password='******')
plugins = server.get_plugins_info()
print plugins
I got a deprecation warning about get_plugins_info() but definitely no 403 errors, so I assume you are using the wrong password/token to connect.
are you still getting the error?
I think I opened it following an email sent to infra, you can close for now and if someone will hit it they can open a new ticket.
Ack, closing as I can't find the original email in any of the lists. Will re-open if we have more info on this.