How does communicate gitlab runners?

Hello,

I was wondering how does work gitlab runners. How does it talk to gitlab.com and how is it syncronized ?

When we install the runner on a remote server with shell, is the connection to gitlab.com secure ?

On which protocol is based this communication ? Https, ssh, etc ?

Thank you in advance :smiley:

Reply from the support :

Runners communicate with GitLab over HTTPS, entirely through connections initiated from the Runner to GitLab and never in reverse. The advantage here is that you can install a Runner behind a firewall and as long as the Runner has outbound access to GitLab.com it will work. From there, it really doesn’t matter which executor you use (Shell, Docker, etc).

:smile:

1 Like

Hi,

I have a doubt. If connection is one way , from runner to gitlab then how does gitlab deploy to remote? How does runner comes to know that we have ran a pipeline and it has to comunicate with gitlab?

See gitlab access logs , runner is constantly polling the server

1 Like

the answer was useful, thanks @iahmad-khan and @mib-energreen

I would like to come back to this thread. Is there - meanwhile - any option to reverse the directory of connection initiation? Following scenario: I’ve an internal Gitlab server running on on-premises resources. It is - obviously - not accessible from the world. Now I want to deploy runners on container infrastructures like GCP or MassiveGrid. However, these runners can not connect to the Gitlab server while the Gitlab server could connect to these runners. Is there any option? Or workaround?

Thanks
Wolfgang

Hello @wolutator,

I think even if you achieved this , the next problem would be that the runner will firstly try to pull the git repository over https as well.

The only thing I could think of is to establish a VPN between the runner and the server?