LoginSignup
5
6

More than 5 years have passed since last update.

GitHub と Bitbucket の SSH キー ( 公開鍵 ) を取得するための URL

Posted at

URL

GitHub

https://github.com/<username>.keys
https://api.github.com/users/<username>/keys

BitBucket

https://bitbucket.org/api/1.0/users/<username>/ssh-keys

何に使えるか?

インフラの初期設定で、チーム内メンバーのアカウントを発行する際に公開鍵認証を設定すると思います。 ~/.ssh/authorized_keys に SSH キー ( 公開鍵 ) を追記することで可能となりますよね。その際に、手作業で設定するのではなく Ansible 等のサーバー構成管理ツールを使って自動化設定したい!と思う方は少なくないはずです。
例えば、Ansible の場合だと下記のような設定になると思います。

- authorized_key: user=<username> key=https://github.com/<username>.keys

参考文献

5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6