首先需要下载安装Git
sudo apt-get install git
然后需要对Git进行基本的配置
git config --global color.ui true #配置彩色的Git输出
git config --global user.name "YOUR NAME"
git config --global user.email "YOUR@EMAIL.com"
git config --global core.pager 'less -x1,5' #设置tab等于两个空格 or
git config --global core.pager 'less' #设置tab等于四个空格
ssh-keygen -t rsa -b 4096 -C "YOUR@EMAIL.com" #生成公钥和私钥
把公钥添加到你的Github账户中
cat ~/.ssh/id_rsa.pub
ssh -T git@github.com #测试是否添加成功
#如果添加成功,会有以下提示信息
Hi Your-github-user-name! You've successfully authenticated, but GitHub does not provide shell access.
网友评论