1

I set up a SSH key pair to connect Bitbucket with Jenkins. But after that, I can't clone repositories from Bitbucket. The error I'm getting is as follows.

conq: repository access denied. fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

I have all access rights with the repository as it is my private repository. So, can somebody help me?

2 Answers2

0

The usual issue is the user account used for running Jenkins, and the user environment variable seen by Jenkins when the job is run.

You need to make sure the job sees the environment variable HOME, in order to seek the public ssh key in %HOME%/.ssh.

See more at "git clone/ssh under jenkins".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

Try this:

git remote set-url website abc@***.com:path/to/repo

Put the username, followed by an @, before the remote hostname

happyvirus
  • 279
  • 3
  • 21
  • why did you decide to distribute your points here and there ? :) –  Nov 20 '14 at 21:17
  • Sharing is caring? :) – happyvirus Nov 20 '14 at 21:20
  • I mean you set bounties on questions that are not yours :) –  Nov 20 '14 at 21:21
  • Yes, I felt connected with those questions and in a way wanted to try features of SO . It'll all come back soon hopefully – happyvirus Nov 20 '14 at 21:24
  • 1
    You have few points only but you gave the third of them already, whereas those who have so much do not care. That shows you are intelligent, generous and postive Person. Regards –  Nov 20 '14 at 21:32