Any way to set custom ssh port for self-hosted Gitlab?

I’m using self-hosted Gitlab to deploy a branch for my site but we use a non-standard port for ssh.

Any attempt to deploy generates the error:

ssh: connect to host gitlab.mydomain.com port 22: Connection timed out

Is there some way to set which port to attempt to connect via ssh?

1 Like

hi there, i’m not sure that’s possible, see this thread:

I’m having the same problem as @tommulkins , I have a self hosted gitlab and we’ve closed off port 22 for various reasons, and the netlify infrastructure to access my repo for deployment only requests port 22. I don’t need to SSH in once it’s deployed, as that linked article seems to suggest is not possible, I just want to customize the port that the deployment process uses.

If we can’t customize the port, is there a static IP that we can whitelist that netlify uses to access our self-hosted gitlab repos?

Hey @jamesholbert,
Unfortunately there’s not a great way. Let’s discuss in our helpdesk (since whatever we come up with will not be universally applicable) and see if we can figure something out.

@jen, how are you?
Here is the same issue.
Is there any solution?

Hi @DarkoArnautov,

I can see that you posted here before opening a new thread. But now that you’ve it open, let’s keep the discussion going there: Deployment failed with self-hosted gitlab repo.