Running `composer install` fails for private repos

I am trying to run composer install from a private repo as part of our deployment process. We have been running this using Ansible in the past and it works fine. When I run it using Chef it tells me permission is denied. It uses a key that we have already placed on the server and is added as a deployment key to our bitbucket repo. Has anyone done this successfully? What do I need to add to make it work with the specific key?