Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another Rugged issue - "Hook push_to_remote #3238

Open
joaobenine opened this issue Aug 3, 2024 · 3 comments
Open

Another Rugged issue - "Hook push_to_remote #3238

joaobenine opened this issue Aug 3, 2024 · 3 comments

Comments

@joaobenine
Copy link

joaobenine commented Aug 3, 2024

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!

@TafkaMax
Copy link

TafkaMax commented Sep 18, 2024

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.

Copy link

This issue is stale because it has been open 90 days with no activity.

@github-actions github-actions bot added the Stale label Dec 18, 2024
@ankitsinghvisen
Copy link

ankitsinghvisen commented Feb 26, 2025

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 "[email protected]:ankit.singh/switches-configuration.git":String>) for event :post_store

@github-actions github-actions bot removed the Stale label Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants