I heard that there was a public URL for all users on github where you can access their public keys or they can supply that URL of all their public keys. Is this true? If so what is that URL. Does it exist for bitbucket as well?
To add an SSH key to your GitHub account, use the ssh-key add subcommand, specifying your public key. To include a title for the new key, use the -t or --title flag. If you generated your SSH key by following the instructions in "Generating a new SSH key", you can add the key to your account with this command.
Since git just uses ssh to connect, it will use whichever key ssh would use to connect to the remote host.
You can get with:
curl https://github.com/<username>.keys
Replace <username>
with the actual username of the GitHub user.
This is useful when you set login permission to other servers. Just save its output into ~/.ssh/authorized_keys
. To append it to the end from the command line:
curl https://github.com/<username>.keys | tee -a ~/.ssh/authorized_keys
It can also be done using Github API
curl -i https://api.github.com/users/<username>/keys
For bit bucket you can use the following: (This call requires authentication.)
curl -i https://bitbucket.org/api/1.0/users/<accountname>/ssh-keys
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With