I know this is possible because I’ve done it earlier with another CircleCI project, but I cannot make it work now and keep going in circles.
The error I get is:
#!/bin/bash -eo pipefail git clone email@example.com:AAA Cloning into 'content'... Unauthorized fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Exited with code exit status 128 CircleCI received exit code 128
From what I understand, I need to configure something in the project’s ‘SSH Keys’ settings. Even though my other CircleCI project that accesses BitBucket private repositories doesn’t have special settings there.
On that ‘SSH Keys’ page, I get confused. There’s a hyperlink that says “See the Bitbucket integration docs.”. However, that link points to
https://circleci.com/docs/github-integration/#creating-a-bitbucket-user-key, and on that page BitBucket is mentioned never. The heading linked to doesn’t exist there either.
Via online search I found this page:
https://circleci.com/docs/bitbucket-integration/#enable-your-project-to-check-out-additional-private-repositories. There it says " Scroll down the page to User Key and click Authorize with Bitbucket .". However, my ‘SSH Keys’ page doesn’t have an ‘Authorize with Bitbucket’ button.
If I try the ‘Add User Key’ button on the ‘SSH Keys’ page, which I do have, then the build still fails and I get this error:
Using SSH Config Dir '/home/circleci/.ssh' git version 2.38.1 Cloning git repository Cloning into '.'... firstname.lastname@example.org: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. exit status 128
Would anyone know the process I should take to make this work? Thanks so much for any suggestions!