Skip to content

Commit b9ea906

Browse files
committed
出力を分離
1 parent 681df7f commit b9ea906

File tree

1 file changed

+8
-2
lines changed
  • docs/3-web-servers/10-git-github-init

1 file changed

+8
-2
lines changed

docs/3-web-servers/10-git-github-init/index.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,18 @@ GitHubに公開鍵を登録しましょう。
110110
公開鍵と秘密鍵のペアを生成するには、`ssh-keygen`コマンドを使用します。次のコマンドを実行することで、`Ed25519`というアルゴリズムの実装を用いて鍵を生成できます。途中でターミナルの表示画面が止まりますが、`user@host:~$`が再度表示されるまでEnterキーで進みます。
111111

112112
```shell
113-
$ cd ~
114-
$ ssh-keygen -t ed25519
113+
cd ~
114+
ssh-keygen -t ed25519
115115
```
116116

117117
デフォルトでは公開鍵が`~/.ssh/id_ed25519.pub`、秘密鍵が`~/.ssh/id_ed25519`に格納されます。公開鍵のファイルを`cat`コマンドを用いて出力しましょう。
118118

119+
```shell
120+
cat ~/.ssh/id_ed25519.pub
121+
```
122+
123+
次のように表示されたら成功です。
124+
119125
```shell
120126
$ cat ~/.ssh/id_ed25519.pub
121127
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEqE0cyVkFSFD/BlAwvJ9QejXwgyFppn5JDQc8iGW/Gp [ユーザー名]@[コンピューター名]

0 commit comments

Comments
 (0)