oxidized icon indicating copy to clipboard operation
oxidized copied to clipboard

Rugged::SshError: Failed to authenticate SSH session: Unable to send userauth-publickey request

Open Damianb0 opened this issue 1 year ago • 2 comments

Hi, I'm having a problem pushing to Git. This is what i see in log

Hook push_to_remote (#GithubRepo:0x0000563c8e0dbaf8) failed (#<Rugged::SshError: Failed to authenticate SSH session: Unable to send userauth-publickey request>) for event :node_success

I, [2023-11-27T13:27:05.931986 #927190] INFO -- : GithubRepo: to remote: [email protected]:user/oxi-local.git /var/lib/gems/2.7.0/gems/rugged-0.28.5/lib/rugged/repository.rb:258: warning: Using the last argument as keyword parameters is deprecated D, [2023-11-27T13:27:06.737585 #927190] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git' D, [2023-11-27T13:27:06.859602 #927190] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git' D, [2023-11-27T13:27:06.972387 #927190] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git' ... D, [2023-11-27T13:29:05.830342 #927190] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git' D, [2023-11-27T13:29:05.830673 #927190] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git' D, [2023-11-27T13:29:05.830984 #927190] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git' D, [2023-11-27T13:29:05.831340 #927190] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git' D, [2023-11-27T13:29:05.831656 #927190] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git' D, [2023-11-27T13:29:05.832008 #927190] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git' E, [2023-11-27T13:29:05.833121 #927190] ERROR -- : Hook push_to_remote (#GithubRepo:0x00005590848890b8) failed (#<Rugged::SshError: Failed to authenticate SSH session: Unable to send userauth-publickey request>) for event :node_success D, [2023-11-27T13:29:05.838258 #927190] DEBUG -- : lib/oxidized/worker.rb: Jobs running: 0 of 1 - ended: 1 of 10

My config:

 output:
  default: git
  debug: true
  git:
    single_repo: true
    user: user
    email: pass
    repo: "/home/oxidized/repo/oxi-local/.git"
hooks:
  push_to_remote:
    type: githubrepo
    events: [node_success]
    remote_repo: [email protected]:user/oxi-local.git
    publickey: /home/oxidized/.ssh/id_ed25519.pub
    privatekey: /home/oxidized/.ssh/id_ed25519

But when I changed ssh key to rsa, then i got

<Rugged::SshError: ERROR: You're using an RSA key with SHA-1, which is no longer allowed

So I supposed that communication is correct.

$ git pull Transferred: sent 2776, received 2772 bytes, in 0.6 seconds Bytes per second: sent 4866.0, received 4859.0 debug1: Exit status 0 Already up to date. $

This instance jest on Debian 11.8 whit Rugged ssh supported.

I created new VM witch Debian 12 and everything works fine. But there is new wersion ruby, libssh etc

Damianb0 avatar Nov 27 '23 11:11 Damianb0

I'm not sure, but it looks like a problem in libssh: https://github.com/libssh2/libssh2/issues/336

robertcheramy avatar Nov 27 '23 14:11 robertcheramy

On Debian 11.8 I have 1.9.0-2 version of libssh2

root@host# dpkg -l | grep libssh ii libssh2-1-dev:amd64 1.9.0-2 amd64 SSH2 client-side library (development headers)

Damianb0 avatar Nov 27 '23 18:11 Damianb0