This is likely because the workflow runner pod is not configured to clone the repository. By default, workflow runner pods use the access token received from GitHub/GitLab on VCS events to clone repositories. This means that the GitHub App / GitLab user needs to have access to the repository in question.
Note also that it's only possible to clone over HTTPS when using an access token. If you need to clone over SSH, you will need to configure git specifically for that in a workflow init step. You can store the required keys in Garden Cloud. Here's a guide from GitHub that details how to authenticate against a git server over SSH.
If you do need to make changes to the workflow runner git configuration, keep in mind that by default it's configured to read credentials from the
git-credentials-storeand that you may need to override this behaviour.