Bitbucket Server ssh:// not working on deploy

Hi,

i try to deploy a project from trellis. The Bitbucket Repository is hosted
on a private Bitbucket Server.

The url looks like this:

ssh://git@code.example.com/repos/example-project.git

The git@code.example doesn’t work and with ssh:// i get the following error:

fatal: [10.0.0.116]: FAILED! => {“changed”: false, “failed”: true, “invocation”: {“module_args”: {“msg”: “Invalid Git repository.\nEnsure that your site’s repo variable is defined in group_vars/staging/wordpress_sites.yml and uses the SSH format (example: git@github.com/roots/bedrock.git)\nMore info:\n> https://roots.io/trellis/docs/deploys/\n”}, “module_name”: “fail”}, “msg”: “Invalid Git repository.\nEnsure that your site’s repo variable is defined in group_vars/staging/wordpress_sites.yml and uses the SSH format (example: git@github.com/roots/bedrock.git)\nMore info:\n> https://roots.io/trellis/docs/deploys/\n”}

Is there an easy way to solve this?

Regards Kevin

Your repo needs to be in format it says:

git@code.example.com:username/repo.git

What doesn’t work when using that format?

Try this format for repo in wordpress_sites, with the colon after githost:
repo: git@githost.com:username/projectname.git

I’ve just deployed a project usingrepo: git@bitbucket.org:ptibbetts/speakersfive.co.uk.git

Hi thank you for the tip. I always tried:

git@code.example.com/repos/example-project.git

But i should be

git@code.example.com : /repos/example-project.git

Stupid me!

Thank you

Regards Kevin

2 Likes