ytti / oxidized

Oxidized is a network device configuration backup tool. It's a RANCID replacement!
Apache License 2.0
2.76k stars 916 forks source link

Another Rugged issue - "Hook push_to_remote #3238

Open joaobenine opened 1 month ago

joaobenine commented 1 month ago

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 (#) failed (#<NoMethodError: undefined method has_key?' for "git@git.webserver.com:other-location/base1/oxidized.git":String>) for event :poststor

_E, [2024-08-02T15:44:17.230306 #66098] ERROR -- : Hook push_to_remote (#) failed (#) for event :poststore

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: oxidized445522@gmail.com 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: git@git.webserver.com: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: git@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

# 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!

TafkaMax commented 5 days ago

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.