Hardcoded ~/.ssh/id_rsa.pub in the code. How is the ssh key meant to be used?

Hi,

I installed version 3 of Gitlab CI yesterday in my private server and set it up to connect to my Gitlab installation in the same server. Then I wanted to quick register a runner in my dev machine to test the whole thing, but found me unable to do so.

In the new runner installation process, I am trying to create a brand new passwordless ssh key, as I don't want to overwrite the one I have in my ~/.ssh folder. The installation process ends just fine, but when I try to activate the new runner for the project I get an error stating that the deploy key can't be added. Apparently, the problem I have is that the ssh-key path is hardcoded in the application and the one that I am creating has no effect. My ssh key is already associated to my user in Gitlab, and therefore it returns an error when setting up a new deploy key stating that the key is already taken.

I would like to know more about how you envision this whole process. I don't know if my needs are somewhat special, but I would prefer to run the runner under existing accounts in dev machines and avoid creating new users per each runner I want to add.

I have refactored the code to remove the hardcoded ~/.ssh/id_rsa.pub reference and make it customizable, but I wanted to double check with you before I keep working on that and submit a pull request, to see if that is something that would benefit the project

I hope I've explained myself correctly and everything makes sense.

Cheers