How can I access Gitlay CLI?
I suppose you mean Gitaly service. There is no CLI specifically for Gitaly; however, you can perform Gitaly-related activities in the same CLI you use to access your GitLab instance.
There might be other complexities involved if you’re using HA but all Rails nodes should be able to reach their respective Gitaly nodes.
I just need setup git server hooks for my repositories. Docs are recommending using gitlay ci which is missing (or whatever) on my machine
Please share the documentation URL. Maybe you mean GitLab CLI
?
Thanks.
I do not see the term gitlay ci
or gitaly ci
in the docs Git server hooks | GitLab
Can you elaborate in more detail what you tried already in your environment to get server hooks up and running, and show an example server hook script that you want to add? Additional question: Do you have access to the GitLab server terminal, as well as how is GitLab setup (Linux package, Kubernetes Helm chart, etc.)
I have access to server on with GitLab instance is running. Currently i’v setuped hooks manualy; in the old way according to documentation. I was really surprised seeing another cli tool
I am afraid I have the exact same question
In the already mentioned docs the sample code provided is this:
cat hooks.tar | gitaly hooks set --storage <storage> --repository <relative path> --config <config path>
All that comes from a shell on the gitlab server is the following
gitaly: command not found
So I tried the rails console which is also not aware of such a command:
--------------------------------------------------------------------------------
Ruby: ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]
GitLab: 16.0.4 (de651c726de) FOSS
GitLab Shell: 14.20.0
PostgreSQL: 13.11
------------------------------------------------------------[ booted in 24.82s ]
Loading production environment (Rails 6.1.7.2)
irb(main):001:0> gitaly
(irb):1:in `<main>': undefined local variable or method `gitaly' for main:Object (NameError)
irb(main):002:0>
So I what kind of environment do I have to use the mentioned “hooks set” command?
Is the above mentionend “gitaly” a binary file that deals with the command?
Where do I find it?
What part of the documentation did I miss?
It looks like the old way of making the custom_hooks directory and putting the hook in there still works, no need for the whole tar and use gitaly command process.