-
ターミナルターミナルGit Bashを開いてください。
-
既存の SSH キーが存在するかを確認するため、以下のように
ls -al ~/.ssh
と入力します.$ ls -al ~/.ssh # .ssh ディレクトリ内のファイルを一覧表示する(存在する場合)
-
ディレクトリの一覧から、公開 SSH キーをすでに持っているか確認します。 By default, the filenames of supported public keys for GitHub Enterprise Server are one of the following.
- id_rsa.pub
- id_ecdsa.pub
- id_ed25519.pub
Tip: If you receive an error that ~/.ssh doesn't exist, you do not have an existing SSH key pair in the default location. You can create a new SSH key pair in the next step.
-
Either generate a new SSH key or upload an existing key.
-
If you don't have a supported public and private key pair, or don't wish to use any that are available, generate a new SSH key.
-
If you see an existing public and private key pair listed (for example, id_rsa.pub and id_rsa) that you would like to use to connect to GitHub Enterprise Server, you can add the key to the ssh-agent.
For more information about generation of a new SSH key or addition of an existing key to the ssh-agent, see "Generating a new SSH key and adding it to the ssh-agent."
-
既存の SSH キーの確認
SSH キーを生成する前に、SSH キーがすでに存在するかどうかを確認できます。