Before adding a new SSH key to your account on GitHub Enterprise Serverインスタンス, you should have:
After adding a new SSH key to your account on GitHub Enterprise Serverインスタンス, you can reconfigure any local repositories to use SSH. 詳しい情� �についてはリモート URL の HTTPS から SSH への切り替えを参照してく� さい。
-
SSH 公開鍵をクリップボードにコピーします。
SSH 公開鍵のファイル名がサンプルコードと異なる� �合は、現在の設定に一致するようにファイル名を変更してく� さい。 キーをコピーする際には、改行や空白を追� しないでく� さい。
$ pbcopy < ~/.ssh/id_ed25519.pub # Copies the contents of the id_ed25519.pub file to your clipboardヒント:
pbcopyがうまく動作しない� �合は、� れフォルダ.sshにアクセスし、使い慣れたテキストエディタでこのファイルを開き、クリップボードにコピーしてく� さい。 -
任意のページの右上で、プロフィール画像をクリックし、続いてSettings(設定)をクリックしてく� さい。
![ユーザバーの [Settings(設定)] アイコン](https://github.github.com/docs-ghes-3.1/assets/cb-34573/images/help/settings/userbar-account-settings.png)
-
ユーザ設定サイドバーでSSH and GPG keys(SSH及びGPGキー)をクリックしてく� さい。

-
[New SSH key] または [Add SSH key] をクリックします。

-
[Title] フィールドで、新しいキーを説明するラベルを追� します。 たとえば個人の Mac を使っている� �合、このキーを "Personal MacBook Air" などと呼ぶことが考えられます。
-
キーを [Key] フィールドに貼り付けます。

-
[Add SSH key] をクリックしてく� さい。

-
GitHub Enterprise Server パスワードの確認を促された� �合は、確認します。

-
SSH 公開鍵をクリップボードにコピーします。
SSH 公開鍵のファイル名がサンプルコードと異なる� �合は、現在の設定に一致するようにファイル名を変更してく� さい。 キーをコピーする際には、改行や空白を追� しないでく� さい。
$ clip < ~/.ssh/id_ed25519.pub # Copies the contents of the id_ed25519.pub file to your clipboardヒント:
clipがうまく動作しない� �合は、� しフォルダ.sshにアクセスし、使い慣れたテキストエディタでこのファイルを開き、クリップボードにコピーしてく� さい。 -
任意のページの右上で、プロフィール画像をクリックし、続いてSettings(設定)をクリックしてく� さい。
![ユーザバーの [Settings(設定)] アイコン](https://github.github.com/docs-ghes-3.1/assets/cb-34573/images/help/settings/userbar-account-settings.png)
-
ユーザ設定サイドバーでSSH and GPG keys(SSH及びGPGキー)をクリックしてく� さい。

-
[New SSH key] または [Add SSH key] をクリックします。

-
[Title] フィールドで、新しいキーを説明するラベルを追� します。 たとえば個人の Mac を使っている� �合、このキーを "Personal MacBook Air" などと呼ぶことが考えられます。
-
キーを [Key] フィールドに貼り付けます。

-
[Add SSH key] をクリックしてく� さい。

-
GitHub Enterprise Server パスワードの確認を促された� �合は、確認します。

-
SSH 公開鍵をクリップボードにコピーします。
SSH 公開鍵のファイル名がサンプルコードと異なる� �合は、現在の設定に一致するようにファイル名を変更してく� さい。 キーをコピーする際には、改行や空白を追� しないでく� さい。
$ cat ~/.ssh/id_ed25519.pub # Then select and copy the contents of the id_ed25519.pub file # displayed in the terminal to your clipboardTip: Alternatively, you can locate the hidden
.sshfolder, open the file in your favorite text editor, and copy it to your clipboard. -
任意のページの右上で、プロフィール画像をクリックし、続いてSettings(設定)をクリックしてく� さい。
![ユーザバーの [Settings(設定)] アイコン](https://github.github.com/docs-ghes-3.1/assets/cb-34573/images/help/settings/userbar-account-settings.png)
-
ユーザ設定サイドバーでSSH and GPG keys(SSH及びGPGキー)をクリックしてく� さい。

-
[New SSH key] または [Add SSH key] をクリックします。

-
[Title] フィールドで、新しいキーを説明するラベルを追� します。 たとえば個人の Mac を使っている� �合、このキーを "Personal MacBook Air" などと呼ぶことが考えられます。
-
キーを [Key] フィールドに貼り付けます。

-
[Add SSH key] をクリックしてく� さい。

-
GitHub Enterprise Server パスワードの確認を促された� �合は、確認します。

To learn more about GitHub CLI, see "About GitHub CLI."
Before you can use the GitHub CLI to add an SSH key to your account, you must authenticate to the GitHub CLI. For more information, see gh auth login in the GitHub CLI documentation.
To add an SSH key to your GitHub account, use the ssh-key add subcommand, specifying your public key.
gh ssh-key add key-file
To include a title for the new key, use the -t or --title flag.
gh ssh-key add key-file --title "personal laptop"
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.
gh ssh-key add ~/.ssh/id_ed25519.pub