Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

참고자료 : https://docs.github.com/en/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication

git config

Code Block
git config --global user.name "tjmoon"
git config --global user.email "tjmoon@example.com"
git config --global init.defaultBranch main

github ssh 인증

https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh

...

Code Block
languagebash
$ ssh -T git@github.com

...

github 계정이 여러 개 있는 경우 ssh 의 설정을 통해서 사용을 할 수 있다.

ssh config 작성

Code Block
git# ~/.ssh/config
--global user.name "tjmoon"
git config --global user.email "tjmoon@example.com"
git config --global init.defaultBranch mainHost github.com-company
  HostName Github.com
  IdentityFile ~/.ssh/id_rsa_company
  User company-tjmoon

Host github.com-personal
  HostName github.com
  IdentityFile ~/.ssh/id_rsa_personal
  User personal-tjmoon

확인

Code Block
ssh -T git@github.com-personal
ssh -T git@github.com-company

git repo 이름 규칙 (선택)

필수는 아니지만 가능한한 프로젝트의 성격을 나타낼 수 있는 이름으로 정한다.

...