Menu

How to enable SSH clone on self hosted GitLab running in a private subnet behind an AWS ALB?

#devops#redditdevops#gitlab#clone#office
Reading 0:00
15s threshold

We have self-hosted GitLab CE on an AWS EC2 instance.

Current setup:

The instance is in a private subnet with no public IP.

Users reach GitLab through an Application Load Balancer on HTTPS, with access restricted to our office IPs.

HTTPS clone with personal access tokens works fine.

The problem:

We're moving our repos from gitlab.com to this server. On gitlab.com, all our Jenkins jobs and developers clone over SSH (git@...). On our server SSH clone doesn't work, because the ALB only supports HTTP/HTTPS, so port 22 has no way in.

Our Jenkins agent runs in the same AWS VPC. Developers connect from the office network or VPN.

What's the best way to enable SSH clone here, keeping it secure and limited to our office and Jenkins? Any suggestions or experience with a similar setup would help.

submitted by /u/Manoj-praba
[link] [comments]