7

I just set up Github and generated my ssh keys. I need to give my public rsa to somebody so they can allow me access to their git repo. Do I send them

a) my entire .pub file,

b) the contents of the .pub file, or

c) the key that i see if i log in to Github and go to ssh keys(looks like: id_rsa (22:ac:74:6b:a7:d9:14:a5:32:8f:08:c5:51:1b:49:lk)

Renaissance
  • 798
  • 5
  • 15
moe
  • 105
  • 1
  • 6
  • 1
    That `22:ac:...` bit is the so-called fingerprint of your public key -- a cryptographic digest of the key's contents which allows to represent the key in a succint human-readable form while being unique for each key. – kostix Apr 26 '13 at 12:23
  • There are a list of keys on my github account under the SSH keys part. How do I know which ones are private keys and which ones are public keys? I see some of them have a green dot next to them. But even if I know which ones are private and which ones are public, how do I even get their contents and send them if the : : : format is just for human readability? – Charlie Parker Apr 15 '14 at 21:24

2 Answers2

11

Send the contents of id_rsa.pub or the file id_rsa.pub itself. Either way. (Also: Remember never to send your private key.)

btanaka
  • 382
  • 2
  • 6
  • alright thats exactly what I was looking for thanks, I'll accept your answer in a couple mins it says I can't accept an answer within 2 minutes – moe Apr 26 '13 at 03:23
1

If they know your username, they can get your public key already. See What is the public URL for the Github public keys.

This could also be handled by them adding you as a collaborator via the repo settings at https://github.com/username/repo/settings/collaboration

Community
  • 1
  • 1
Everett Toews
  • 10,337
  • 10
  • 44
  • 45