Ensure repo is valid with SSH on Port 443

I’m working on a server with port 22 blocked. So the task Ensure repo is valid fails. I’m using bitbucket to host my repo and they allow ssh connections on port 443 but even if I define on wordpress_sites.yml

repo: git@altssh.bitbucket.org:443:username/repo.git

it doesn’t work and i suspect i should be doing
git@altssh.bitbucket.org:443:username/repo/

but then trellis says
msg: Invalid Git repository. Ensure that your site'srepovariable is defined ingroup_vars/staging/wordpress_sites.ymland uses the SSH format (example: git@github.com/roots/bedrock.git)
anyone has an idea how can i solve this?

You said git@altssh.bitbucket.org:443:username/repo.git “doesnt work”. What didn’t work?

I just tried cloning a private bitbucket repo in that format and it works fine. It will also pass the “Ensure repo is valid” check.

I think the port thing doesn’t work it still tries to connect to 22

Instead of having the port in Trellis, try defining the port via ~/ssh/config instead:

Host altssh.bitbucket.org
Port 443
3 Likes

That did the trick! thank you so much