Changed repo name, cannot deploy

I am using bedrock-ansible and everything has been working swimmingly. However, I recently changed my user name at bitbucket, where my repo is stored, and now I cannot deploy to my staging server. I went through the ansibile folder and changed every reference from the old repo name to the new repo name, but I am still getting permissions errors. Here is the relevant output from the terminal:

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

Any ideas on something else I need to change to get this going again?

What does git remote -v say? If it’s refers to the old username, you probably should handshake again and/or add a new remote.

From the server or locally? Locally it is correct and I am able to push and pull just fine.

If you’re still able to git clone from your local machine, I can’t think of why it would stop working to clone from the remote server. You could double-check that when you SSH into the remote server, you’re able to git clone your repo. If that fails, you might double-check your general SSH forwarding setup and a few trellis SSH forwarding settings.

1 Like

Ugh. it was this thing: /usr/bin/ssh-add -K

I was passing it the path to my key, but didnt realize it wasnt working. Just needed to run it without the path to my key to grab the default key/identity.