@@ -5,6 +5,7 @@ title: Git と GitHub のセットアップ
55import registerGitHubVideo from " ./register-github.mp4" ;
66import setupGitVideo from " ./setup-git.mp4" ;
77import addSshKeyVideo from " ./add-ssh-key.mp4" ;
8+ import testSshConnectionVideo from " ./test-ssh-connection.mp4" ;
89
910## バージョン管理システム
1011
@@ -146,3 +147,57 @@ ssh-ed25519 AAAAC3...GW/Gp user@computer
146147![ SSHキーを追加] ( ./add-ssh-key.png )
147148
148149上記のようなページが表示されたら、` Title ` に適切な名前、` Key ` には先ほどターミナルで表示した公開鍵を入力して登録しましょう。
150+
151+ ## 確認
152+
153+ ここまでで Git と GitHub のセットアップが完了しました。
154+ この章で行ってきたセットアップが正しくできているのかは次のようにして確認することができます。
155+
156+ ### Git の初期設定の確認
157+
158+ 次のコマンドを実行することで Git の設定を確認することができます。
159+
160+ ``` shell
161+ git config --global --list
162+ ```
163+
164+ 次のように表示されていれば正しく設定できています。
165+
166+ ``` shell
167+ $ git config --global --list
168+ user.name=名前
169+ user.email=メールアドレス
170+ init.defaultBranch=main
171+ ```
172+
173+ ### SSH 接続のテスト
174+
175+ 次のコマンドを実行することで SSH 接続が正常につながっているかをテストすることができます。
176+
177+ ``` shell
178+ 179+ ```
180+
181+ :::info
182+
183+ この操作の際、初回は以下のような警告が出る場合があります。
184+
185+ ``` plain
186+ The authenticity of host 'github.com (20.27.177.113)' can't be established.
187+ ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
188+ This key is not known by any other names
189+ Are you sure you want to continue connecting (yes/no/[fingerprint])?
190+ ```
191+
192+ これは、接続先となっている GitHub が、なりすましではなく本物の GitHub であると信頼してもよいかを尋ねるメッセージです。
193+ 家庭用のインターネット回線、UTokyo Wi-Fi 等、十分に信頼できるネットワークに接続している場合は問題ありませんので、` yes ` と入力して続行させてください。
194+
195+ :::
196+
197+ 次のように表示されたら成功です。
198+
199+ ``` shell
200+ Hi 名前! You' ve successfully authenticated, but GitHub does not provide shell access.
201+ ```
202+
203+ <video src={testSshConnectionVideo} controls />
0 commit comments