github repo won't push on post_store event
E, [2022-09-14T16:05:16.708534 #90309] ERROR -- : Hook push_to_remote (#<GithubRepo:0x00005612c50ff360>) failed (#<ArgumentError: wrong number of arguments (given 2, expected 0..1)>) for event :post_store
output:
default: git
git:
single_repo: true
user: oxidized
email: [email protected]
repo: /home/oxidized/network_backups_test/network_backups_test.git
hooks:
push_to_remote:
type: githubrepo
events: [post_store]
remote_repo: [email protected]:oxidized/network_backups_test.git
publickey: /home/oxidized/.ssh/id_rsa.pub
privatekey: /home/oxidized/.ssh/id_rsa
Does anyone have any insight on what might be causing this issue?
Worked around by pushing with shell script via exec hook.
Also hitting this...
I have a sneaking suspicion this is due to a version breakage with rugged gem and libgit2. I haven't yet tested.
Worked around by pushing with shell script via exec hook.
Thanks, this got me going as well, thankfully my config is pretty simple.
I've been able to capture stack trace, the issue appears to be ruby version compatibility of rugged-0.28.5, specifically /lib/rugged/repository.rb:258:in `fetch'
The issue is Ruby 3.0+ is not compatible with rugged v0.28.5. Ruby 2.7 is compatible. The issue was fixed upstream in rugged gem v1.0.1 via https://github.com/libgit2/rugged/commit/a4ad1dff3d6f7418eda6bbbeb24f70b6e0d43237
I will PR a fix for oxidized.
Worked around by pushing with shell script via exec hook.
Could you share the workaround configuration + script?
Worked around by pushing with shell script via exec hook.
Could you share the workaround configuration + script?
This issue is fixed on the master branch, not yet released.
The issue was that portion of code was not compatible with ruby 3.0+
exec hook.
I was interested in the scripted workaround :)