oxidized icon indicating copy to clipboard operation
oxidized copied to clipboard

github repo won't push on post_store event

Open allenderj opened this issue 3 years ago • 2 comments

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?

allenderj avatar Sep 14 '22 20:09 allenderj

Worked around by pushing with shell script via exec hook.

allenderj avatar Sep 15 '22 19:09 allenderj

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.

Firefishy avatar Sep 16 '22 11:09 Firefishy

Worked around by pushing with shell script via exec hook.

Thanks, this got me going as well, thankfully my config is pretty simple.

crzdmniac avatar Sep 30 '22 13:09 crzdmniac

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'

Firefishy avatar Oct 05 '22 16:10 Firefishy

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.

Firefishy avatar Oct 05 '22 16:10 Firefishy

Worked around by pushing with shell script via exec hook.

Could you share the workaround configuration + script?

ciroiriarte avatar Oct 20 '22 02:10 ciroiriarte

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+

Firefishy avatar Oct 20 '22 06:10 Firefishy

exec hook.

I was interested in the scripted workaround :)

ciroiriarte avatar Oct 20 '22 20:10 ciroiriarte