Skip to content

Latest commit

 

History

History
73 lines (50 loc) · 1.12 KB

README.md

File metadata and controls

73 lines (50 loc) · 1.12 KB

Install Git


@nabang1010

Install Git

sudo apt-get install git

Config

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

Multi-account SSH 1 server

  1. Change to .ssh directory
cd ~/.ssh
  1. Generate SSH key for user 1
ssh-keygen -t ed25519 -C "your_email_1@example.com"
  1. Generate SSH key for user 2
ssh-keygen -t ed25519 -C "your_email_2@example.com"
  1. Go github.com/settings/keys to add SHH keys for 2 users

  2. Edit config file

gedit config
Host your_user_1 github.com
  HostName github.com
  PreferredAuthentications publickey
  IdentityFile /home/nabang1010/.ssh/id_ed25519_your_user_1


Host your_user_2 github.com
  HostName github.com
  PreferredAuthentications publickey
  IdentityFile /home/nabang1010/.ssh/id_ed25519_your_user_2
  1. git clone for user 1
git@your_user_1:your_user_1/repo_name.git
  1. git clone for user 2
git@your_user_2:your_user_2/repo_name.git