0

Many users have their own public ssh keys on github. Is there an easy way to get it knowing someone else's username? I know it's possible - the ubuntu installer gets the keys somehow - but I can't find a way to do it. It would be useful to create account for somebody only asking to github account, not a ssh key.

2

1 Answer 1

2

Although I didn't know that Github makes your public keys public, why would you ask for somebodies Github account rather than ask them directly for their public key when you're setting up public key authentication?

You have people who don't use 1 key for everything and will already have (many) different public keys for GitHub, let alone other keys different purposes.

And when somebody can't provide their public key, I assume they're unlikely to successfully log in using public key authentication either...
But I might be making the wrong assumptions here.

But you can simply make a request to GitHub (API) end-points to list and get all keys:

  • Web: https://github.com/{username}.keys
  • API: https://api.github.com/users/{username}/keys

And consider for example this wrapper https://github.com/chrishunt/github-auth

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .