Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'try-ruby-client')
-rw-r--r--try-ruby-client7
1 files changed, 4 insertions, 3 deletions
diff --git a/try-ruby-client b/try-ruby-client
index ff9c748d4..369e15d72 100644
--- a/try-ruby-client
+++ b/try-ruby-client
@@ -1,7 +1,8 @@
-# this was not working for me; it seems the ruby client tries to make an sslv3 connection
require 'grpc'
require 'gitaly'
-chan = GRPC::Core::Channel.new('localhost:8877',{}, GRPC::Core::ChannelCredentials.new)
+creds = GRPC::Core::ChannelCredentials.new(File.read('gitaly.crt'))
+addr = 'localhost:8877'
+chan = GRPC::Core::Channel.new(addr, { GRPC::Core::Channel::SSL_TARGET => 'gitaly' }, creds)
stub = Gitaly::Notifications::Stub.new(nil, nil, channel_override: chan)
-stub.post_receive(Gitaly::PostReceiveRequest.new)
+puts stub.post_receive(Gitaly::PostReceiveRequest.new(repository: Gitaly::Repository.new))