CircleCI unable to pull secondary git repo (deploy key & user key have been added)

I’m trying to pull a secondary repo from github in my Circle CI pipeline. I’m using a machine account in github and I’ve added the deploy and user keys successfully in CircleCI. I’ve also added the ssh_key fingerprint in the config.yml, however when I run the git clone command it’s failling with the error:

ERROR: Repository not found.
fatal: Could not read from remote repository.

Screen shot of keys set in appropriate project

config.yml file

version: 2.1

      xcode: 11.5.0 # Specify the Xcode version to use
      - add_ssh_keys:

  version: 2.1
      - build_and_deploy

This wound up being due to the user and deploy key being linked to different user accounts in github.

Glad you were able to get this resolved. We recommend using a Machine User when checking out multiple repos. We also recommend checking permissions and confirm that the correct SSH keys are being offered. You can do this by SSH’ing into your build.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.