Error When Trying To Deploy

I am trying to deploy to a pre-configured server (deploy only, no provisioning) and I’m getting the following error:

TASK: [deploy | Clone project files] ******************************************
failed: [mysite.com] => {"cmd": "/usr/bin/git ls-remote '' -h refs/heads/bedrock", "failed": true, "rc": 128}
stderr: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

msg: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access

I’ve set the repo properly in wordpress_sites.yml but it’s not getting used? Where is “refs/heads/bedrock” coming from?

Specifying the repo. If your deploy command is for production, e.g.,

./deploy.sh production mysite.com

you could double-check that you’ve specified your repo in the production directory’s wordpress_sites.yml (vs. in the directory for staging).

Connecting to the repo. Regarding the “Permission denied” issue, have you set up SSH Agent Forwarding? (If you’re on Mac OS X be sure to see note at bottom of link.) For more info you could search Roots discourse for things like “ssh-add”.

Does your git repo have your public ssh key loaded? If you’re using a non-default key pair with this repo, perhaps you’ll need to add an ssh config specifying the private key to use for your repo’s host name (I’m not sure about that).

For more info you could search Roots discourse for things like “clone permission denied”.