Installation and Configuration git ubuntu

Installation and Configuration git ubuntu

A. Install git

1. Download apt git

sudo apt-get install git

To see if the installation:

  • View git version:
git --version
  • Check the installation path of git:
whereis git

II. Configuration user information

1. Configure the user name and mailbox git

git config --global user.name "your name"
git config --global user.email "your email"

2. Create public.

ssh-keygen -C "your email" -t rsa

Click on the enter key three times in a row, will generate .ssh directory under the user's home directory, git there are public and private keys.

  • id_rsa
  • id_rsa.pub

3. Add the SSH key in github.

The directory under .ssh / id_rsa.pub copy all the contents. Log github website, select SSH and GPG keys in settings where. Click the New SSH Key, which will copy all the contents of id_rsa.pub to go.

Published 23 original articles · won praise 6 · views 1575

Guess you like

Origin blog.csdn.net/pentiumCM/article/details/104014401
Recommended