WSL - Git

장현욱(Artlogy)·2022년 10월 12일
0

WSL2

목록 보기
1/2
post-thumbnail

Git

일반적으로 Unbuntu를 쓰면 자동으로 git이 포함되어 있다.
그래도 혹시 모르니 git이 있는지 없는지 확인한다.
$ git --version

Git install

만약 git이 없다면 다운로드 해주자
$ sudo apt-get install git

Git Config

사용자 설정

git config --global user.name "Your Name"
git config --global user.email "Your Email"

vim 설정

git config --global core.editor "vim"

Git SSH

  • WSL에서 SSH접근을 위해선 키를 발급받아야한다.
    ssh-keygen -t ed25519 -C "your_email@example.com"
    ssh-keygen -t rsa -C "your_email@example.com"

  • 발급 후 해당 위치로 가주자. ( 전부 앤터눌러서 넘겼을 경우 home/username/.ssh에 있다.)
    cat {저장된 경로/ed25519.pub}
    cat {저장된 경로/id_rsa.pub}

  • ed25519.pub에 있는 내용을 복사해준다.

  • Github setting에서 등록해주면 끝

0개의 댓글