oxidized icon indicating copy to clipboard operation
oxidized copied to clipboard

Unable to open public key file>) for event :post_store | GitLab SSH

Open Sley67 opened this issue 4 years ago • 1 comments

Hello,

I would like to store my configs into a GitLab repository, but I have an error with my SSH key.

Puma starting in single mode...
* Version 3.11.4 (ruby 2.5.1-p57), codename: Love Song
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://127.0.0.1:8888
Use Ctrl-C to stop
I, [2022-04-06T14:33:20.374906 #30]  INFO -- : Configuration updated for /10.111.121.84
I, [2022-04-06T14:33:20.376597 #30]  INFO -- : GithubRepo: Pushing local repository(/etc/oxidized/configs/devices.git/)...
I, [2022-04-06T14:33:20.381486 #30]  INFO -- : GithubRepo: to remote: [email protected]:Sley67/configs.git
E, [2022-04-06T14:33:21.172165 #30] ERROR -- : Hook push_to_remote (#<GithubRepo:0x000055aaf27fbd20>) failed (#<Rugged::SshError: Failed to authenticate SSH session: Unable to open public key file>) for event :post_store

Here my config files

output:
  default: git
  git:
    single_repo: true
    user: Sley67
    email: [email protected]
    repo: "/etc/oxidized/configs/devices.git"
hooks:
  push_to_remote:
     type: githubrepo
     events: [post_store]
     remote_repo: "[email protected]:Sley67/configs.git"
     publickey: /root/.ssh/id_rsa.pub
     privatekey: /root/.ssh/id_rsa

How can i fix this problem ? Thank you.

Sley67 avatar Apr 06 '22 14:04 Sley67

Do you use the PEM format for the priavte key? see PEM Format in Docu

Bierchermuesli avatar Jun 22 '22 14:06 Bierchermuesli