I’ve been developing a project which requires me to spin up a lot of roots projects (Trellis/Bedrock/Sage) the past few months. I have a strict process I follow.
For the past few days I’ve been hitting a bug where my sites won’t deploy due to not connecting correctly to my github repo via SSH. The error I get:
TASK [deploy : Failed connection to remote repo] *******************************************************************************************************************************************************************************************
task path: /Users/masoninthesis/Sites/thefutur/trellis/roles/deploy/tasks/update.yml:27
System info:
Ansible 2.9.9; Darwin
Trellis version (per changelog): "Support Ansible 2.9"
---------------------------------------------------
Git repo [email protected]:masoninthesis/TheFuturLMS.git cannot be accessed.
Please verify the repository exists and you have SSH forwarding set up
correctly.
More info:
> https://roots.io/trellis/docs/deploys/#ssh-keys
> https://roots.io/trellis/docs/ssh-keys/#cloning-remote-repo-using-ssh-
agent-forwarding
fatal: [thefutur.jackalope.io]: FAILED! => {
"changed": false
}
At first I thought maybe it was the capital letters I put in the github URL. So I fixed that to no avail.
I found a couple posts on this forum that seemed similar, so I followed all the steps suggested. Especially here by @fullyint–
Note that if you test ssh-agent forwarding by running
ssh [email protected] 'ssh -T [email protected]'
When I do this, I get: Permission denied (publickey).
I configure ForwardAgent yes and AllowAgentForwarding, I still get permission denied.
But I think that’s an unrelated issue.
I found the issue for now. I’ll drop it in the next comment so I can mark it as the solution for now.