Another Rugged issue - "Hook push_to_remote
Dear all,
I'm facing many trouble to make oxidized sync file into a git repository. I've followed instructions from #3132 and #1038 .
The Versions of Oxidized and Rugged version installed are oxidized (0.30.1) rugged (1.7.2) Also I've tested with rugged (1.5.1)
The following errors code I get was:
E, [2024-08-02T15:21:29.938726 #65424] ERROR -- : Hook push_to_remote (#GithubRepo:0x00005641a4cc04e8) failed (#<NoMethodError: undefined method has_key?' for "[email protected]:other-location/base1/oxidized.git":String>) for event :post_stor
E, [2024-08-02T15:44:17.230306 #66098] ERROR -- : Hook push_to_remote (#GithubRepo:0x00005570b5ff42d8) failed (#<ArgumentError: Invalid credential type>) for event :post_store
Also I checked the githubrepo.rb file to understand, but all I get is only failure. Now I write a script to upload the entire oxidized folder into a git repo, but I also want make the oxidized work fine.
The git site is not github.com, but a git from a University.
Here's the setting I've written inside config file
# Output setting output: default: git git: user: oxidized email: [email protected] repo: "https://git.webserver.com/other-location/base1/oxidized.git" branch: main
# Hook set attempt 1 hooks: push_to_remote: type: githubrepo events: [post_store] remote_repo: [email protected]:other-location/base1/oxidized.git branch: main
# Hook set attempt 2 hooks: push_to_remote: type: git events: [post_store] remote_repo: https://git.webserver.com/other-location/base1/oxidized.git branch: main
# Hook set attempt 3
hooks:
push_to_remote:
type: githubrepo
events: [post_store]
remote_repo: [email protected]:other-location/base1/oxidized.git
privatekey: "/var/lib/oxidized/.ssh/id_rsa"
publickey: "/var/lib/oxidized/.ssh/id_rsa.pub"
branch: main
# Hook set attempt4
hooks:
push_to_remote:
type: git
events: [post_store]
remote_repo: https://git.webserver.com/other-location/base1/oxidized.git
privatekey: "/var/lib/oxidized/.ssh/id_rsa"
publickey: "/var/lib/oxidized/.ssh/id_rsa.pub"
branch: main
I appreciate any support. Thanks in advance!
I am getting a weird issue on some of my configs aswell.
After 15 minutes of trying to push to repo.
E, [2024-09-18T11:52:10.334755 #30] ERROR -- : Hook push_to_remote (#<GithubRepo:0x00007f9ce40b7b50>) failed (#<Rugged::SshError: SSH could not write data: Failure while draining incoming flow>) for event :post_store
EDIT: It works with some repos but not with others.
This issue is stale because it has been open 90 days with no activity.
I am also facing a similar issue with pushing to git through oxidized config I am facing issues; when running manually, it's working fine. #3420 The git site is not github.com, but a gitlab from a University.
Error code with
E, [2025-02-26T11:38:15.648506 #86733] ERROR -- : Hook push_to_remote (#GithubRepo:0x00007842e1566e58) failed (#<NoMethodError: undefined method `has_key?' for "git@domain:ankit.singh/switches-configuration.git":String>) for event :post_store
I have the same issue.
Hook push_to_remote (#<GithubRepo:0x00007d0832847e40>) failed (#<NoMethodError: undefined method `has_key?' for "[email protected]:user/oxidized-backups.git":String>) for event :post_store
This issue is stale because it has been open 90 days with no activity.