0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Gitの初期設定の備忘録

Last updated at Posted at 2022-04-02

名前とメールアドレスを登録する

$ git config --global user.name "FirstName ListName"
$ git config --global user.email "your_email@gmail.com"

下記のコマンドで設定を確認できる

$ cat ~/.gitconfig

コマンドの出力を読みやすくする

$ git config --global color.ui auto

SSH Keyの設定

$ ssh-keygen -t rsa -C "your_email@gmail.com"

いくつか質問されるが全てenterでOK!

公開鍵をGithubに登録する

下記のコマンドで公開鍵をコピペしておく。

$ cat ~/.ssh/id_rsa.pub

「add deploy key」からキーを登録する。Keyに公開鍵をコピペする。Add keyする。
スクリーンショット 2022-04-02 23.20.48.png

スクリーンショット 2022-04-02 23.23.08.png

確認

下記のように表示されればOK

$ ssh -T git@github.com
Hi! You've successfully authenticated, but GitHub does not provide shell access.
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?