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:
authorJacob Vosmaer <jacob@gitlab.com>2017-03-17 18:14:27 +0300
committerJacob Vosmaer <jacob@gitlab.com>2017-03-17 18:14:27 +0300
commitef14c5c4da73ce5b905134c8b8abeb97a3b9755c (patch)
treed6ee191d57783eb7accfe2ea1ab4b87df857a046
parent416e369acdb7c16d8e562f461c7c757f103e375e (diff)
Get ruby client workinggitaly-ca
-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))