You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I, [2023-03-16T09:42:46.514324 #29] INFO -- : GithubRepo: Pushing local repository(/root/.config/oxidized/alldevices.git/)...
I, [2023-03-16T09:42:46.514483 #29] INFO -- : GithubRepo: to remote: ssh://git@git.example.com:oxidized/alldevices.git
E, [2023-03-16T09:42:46.659204 #29] ERROR -- : Hook push_to_remote (#<GithubRepo:0x0000560b1b80e040>) failed (#<NoMethodError: undefined method `has_key?' for "ssh://git@git.example.com:oxidized/alldevices.git":String>) for event :post_store
Commenting-out the following lines makes the hook function as expected :
elsif cfg.has_key?('remote_repo') && cfg.remote_repo.has_key?(node.group) && cfg.remote_repo[node.group].has_key?('privatekey')
pubkey = cfg.remote_repo[node.group].has_key?('publickey') ? cfg.remote_repo[node.group].publickey : nil
log "Authenticating using ssh keys as '#{git_user}' for '#{node.group}/#{node.name}'", :debug
rugged_sshkey(git_user: git_user, privkey: cfg.remote_repo[node.group].privatekey, pubkey: pubkey)
Looks like the section was added in #2480
ssh-agent (the "else" which works) was added in #343
In my local prod environment, I'm running with the 4 lines commented-out.
I did not manage to edit the elsif condition due to my nonexistent ruby skills.
The text was updated successfully, but these errors were encountered:
packettoobig
changed the title
githubrepo hooks fails to use ssh-agent
githubrepo hook fails to use ssh-agent
Mar 20, 2023
Related file : https://github.com/ytti/oxidized/blob/master/lib/oxidized/hook/githubrepo.rb#L70
Logs
Relevant config section :
Commenting-out the following lines makes the hook function as expected :
Looks like the section was added in #2480
ssh-agent (the "else" which works) was added in #343
In my local prod environment, I'm running with the 4 lines commented-out.
I did not manage to edit the elsif condition due to my nonexistent ruby skills.
The text was updated successfully, but these errors were encountered: