I have set up like follow
1.Jenkin get the code from github and build the .war file using maven plugin.
2.war file is transferred to Ansible server, And ansible build the image using the .war file and push to docker hub (Hear is the actual problem)
I tried to push the image from ansible server to docker hub. Unfortunately, i don’t know how to set up the connectivity between these two in jenkin.
Error for your reference
Step 1/3 : From tomcat:8-jre8
** —> 3639174793ba**
Step 2/3 : MAINTAINER "firstname.lastname@example.org"
** —> Running in ab18bfd6952a**
Removing intermediate container ab18bfd6952a
** —> c880c4c5cdfd**
Step 3/3 : COPY ./webapp.war /usr/local/tomcat/webapps
** —> eb9375e6acd5**
Successfully built eb9375e6acd5
Successfully tagged first_demo:latest
The push refers to repository [docker.io/dockerhub_Name/first_demo]
denied: requested access to the resource is denied
I could see this is a permission issue, But im not sure how to fix this…Can someone help me to fix the issue. Really appreciate your attention.