CircleCi Unable to install dependency defined in composer.json (github private repository owned by me)


CircleCI is unable to Install dependency (Github Private repository defined in composer.json. The private repository is owned by me and I have added user key using Checkout SSH Keys (create and add user key)
Installing XX/XX (dev-master bd89fbc)
Cloning bd89fbc21d0253c94012c5b75fba2d2ea2a38f5c
Failed to download XX/XX from source: Failed to execute git clone --no-checkout ‘’ ‘/home/ubuntu/root-folder/vendor/XX/jXX’ && cd ‘/home/ubuntu/root-folder/vendor/XX/XX’ && git remote add composer ‘’ && git fetch composer

Now trying to download from dist

  • Installing XX/XX (dev-master bd89fbc)
    Downloading: Connecting…

The “” file could not be downloaded (HTTP/
1.1 404 Not Found)

sudo composer install --prefer-source --no-interaction returned exit code 255


Hey @anshul55

Have you connected your project in CircleCI to the GitHub account that has the SSH keys you need to access the private dependency?

  • Project Settings -> Checkout SSH Keys -> Authorize w/ GitHub

If you can see the above option, you probably need to do it. It will prompt you for permission to allow CircleCI to create an SSH key and add it to your GitHub account, and will then automatically use that key to checkout private dependencies with composer.

Hope this helps,