runner icon indicating copy to clipboard operation
runner copied to clipboard

self-hosted runner following tutorial in repo settings removed my SSH id_rsa key

Open kopax opened this issue 1 year ago • 0 comments

Describe the bug

I wanted to try to use my development computer to run self hosted runner to speed up my CI process.

The next day, when I tried to git pull/push from my project, I had my ssh key denied.

This is not ok, I dont keep backup of my key and this force me to update everywhere where my key was used.

To Reproduce

First make sure you have a key in $HOME/.ssh/id_rsa that match its public key

  1. Go to 'settings' on repository page
  2. Go to actions and click on 'Run self-hosted'
  3. Follow tutorial
  4. Your private key is now gone.

Expected behavior

I expect some warning at least on the tutorial page, at the best, that github runner use it's own context.

Runner Version and Platform

I don't know, probably the latest as I have done that yesterday

Linux Debian bookworm

What's not working?

I had :

identity_sign: private key /home/dka/.ssh/id_rsa contents do not match public
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists. 

When I tried to ssh-add my key, the message state it is not my key, but a one from github-runner:

❯ ssh-add /home/dka/.ssh/id_rsa
Identity added: /home/dka/.ssh/id_rsa ([email protected])

kopax avatar Jul 20 '24 13:07 kopax