title: Connecting to bitbucket repository from jenkins server
body: <p>At moment I'm trying to create connection from jenkins to my bitbucket repository, using the git plugin that I've installed in jenkins.</p>
  
  <p>When I enter to the repository URL, I get the following message notification shown in the figure: </p>
  
  <p>"Failed to connect to repository : Command "ls-remote -h git@bitbucket.org:safe2school-ondemand/s2s-android-padres.git HEAD" returned status code 128:
  stdout:
  stderr: Permission denied (publickey).
  fatal: The remote end hung up unexpectedly"</p>
  
  <p><img src="https://i.stack.imgur.com/EhuSV.png" alt="Trying connect to bitbucket repo from jenkins through git"></p>
  
  <p>I've install jenkins on apache tomcat container, which is located in a path /srv/apache-tomcat</p>
  
  <p>In the system I have a  root ssh-key and I add this key to bitbucket.
  I appreciate your support :)</p>