# Provisioning of server works fine. Deployment Fails for Production. Trellis SSH fails

**URL:** https://discourse.roots.io/t/provisioning-of-server-works-fine-deployment-fails-for-production-trellis-ssh-fails/29336
**Category:** trellis
**Tags:** deploys, multisite, ssh, trellis
**Created:** 2025-03-04T03:13:09Z
**Posts:** 10
**Showing post:** 8 of 10

## Post 8 by @jasperfrumau — 2025-03-07T08:43:01Z

And you are sure the repository name _and_ branch was correct? You did use something like

```
...
 branch: main
 repo: git@github.com:user/repo-name.git
...
```

And little general access test:

```
ssh -T git@github.com
Hi jasperf! You've successfully authenticated, but GitHub does not provide shell access.
```

Just really odd the error does not get resolved without adding the private key.

Also , check if agent forwarding is enabled in your local SSH config:

```
cat ~/.ssh/config
```

You should see something like:

```
Host yourserver
    ForwardAgent yes
```

If missing, add:

```
Host yourserver
    HostName yourserver.com
    User your-ssh-user
    ForwardAgent yes
```

I have

```
...
Host *
  AddKeysToAgent yes
  IdentityFile ~/.ssh/id_ed25519
...
```

And two, ensure your SSH agent is running:

```
eval "$(ssh-agent -s)"
```

To check if your SSH key is added:

```
ssh-add -l
```

If empty, add your key:

```
ssh-add ~/.ssh/id_rsa
```

---

_[View the full topic](https://discourse.roots.io/t/provisioning-of-server-works-fine-deployment-fails-for-production-trellis-ssh-fails/29336)._
