I copied the private key from the Jenkins machine running on Docker and ensured it is in the Jenkins user. I then pasted the private key into global credentials as an SSH user with a private key. Additionally, I copied the public key to the repository settings in Bitbucket under 'Access Keys'. However, when I tried to check the connection while configuring the pipeline, it threw an error stating 'STDERR: fatal: repository doesn't exist or you don't have access rights'. I checked various forums, but most solutions contain errors, while my issue is displaying code 128 and above
Hello @ChakradharReddy and welcome to the Community!
The error output indicates an authentication issue between Jenkins and Bitbucket, so I suspect there's potentially some setting missing on Jenkins's side. I found the following article containing step-by-step instructions on how to configure the SSH connection on Jenkins that may be of help :
If after following the steps in that article you are still not able to authenticate, I would suggest running the following command to test your connection to Bitbucket Cloud using the same SSH key you configured in Jenkins :
ssh -Tvvv -i <path to the private key file - the same key you used on Jenkins> git@bitbucket.org
This will provide further details on the SSH authentication and if the key is being recognized by bitbucket.
Thank you, @ChakradharReddy !
Patrik S
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.