From 09751c75ebaee03f5161c4e86f16a18a8f5b050f Mon Sep 17 00:00:00 2001 From: Ahmad Sherif Date: Mon, 3 Apr 2017 15:27:14 +0200 Subject: Add support for Gitaly calls over TCP connection Closes gitaly#166 --- lib/gitlab/gitaly_client.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb index a0dbe0a8c11..fe15fb12adb 100644 --- a/lib/gitlab/gitaly_client.rb +++ b/lib/gitlab/gitaly_client.rb @@ -12,9 +12,11 @@ module Gitlab end def self.new_channel(address) - # NOTE: Gitaly currently runs on a Unix socket, so permissions are + address = address.sub(%r{^tcp://}, '') if URI(address).scheme == 'tcp' + # NOTE: When Gitaly runs on a Unix socket, permissions are # handled using the file system and no additional authentication is # required (therefore the :this_channel_is_insecure flag) + # TODO: Add authentication support when Gitaly is running on a TCP socket. GRPC::Core::Channel.new(address, {}, :this_channel_is_insecure) end -- cgit v1.2.1