Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to load SSH keys from GitHub #374

Open
wants to merge 1 commit into
base: qml
Choose a base branch
from

Conversation

ShellAddicted
Copy link

This PR adds an (advanced) option to automatically load SSH public keys from GitHub
removing the extra step of typing https://github.com/<username>.keys in a web browser and copy->pasting the key.

This could be quite useful for the upcoming Network install feature where copy pasting is not even possible.

@NonstickAtom785
Copy link

Not sure if commenting is frowned upon but...

Nicely done! I just tested your changes on a local branch, and everything seems to work. Tested the compiled version on WIndows 11, Debian, Endevour OS, and a semi-broken Fedora. They all work correctly and open the browser easily. Might as well add a way to login into the imager with Github.

@ShellAddicted
Copy link
Author

Not sure if commenting is frowned upon but...

Nicely done! I just tested your changes on a local branch, and everything seems to work. Tested the compiled version on WIndows 11, Debian, Endevour OS, and a semi-broken Fedora. They all work correctly and open the browser easily. Might as well add a way to login into the imager with Github.

Thanks.
But what do you mean with "and open the browser easily"?

No browser needs to be opened, that's the point of this PR.

Also, no login is required because as the name implies, public keys are public.

@ali1234
Copy link
Contributor

ali1234 commented Sep 4, 2022

The imager appears to use cloud-init to set up users and keys, so it should be enough to type "gh:username" as your ssh key. In theory this will be stored in the cloud-init config at /boot/user-data and cloud-init will fetch the key from github during the first boot process. Have you tried this? I would be quite interested to know if it actually works.

@ali1234
Copy link
Contributor

ali1234 commented Sep 4, 2022

My bad, you have to use a different key in the config, and it relies on ssh-import-id being installed (it probably is), see: https://cloudinit.readthedocs.io/en/latest/topics/modules.html#ssh-import-id

I still think this would be preferable to fetching the key inside the imaging tool though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants