安装git
apt-get install git
查看git 版本
git version
配置ssh
git config –global user.name “xxxxxx”
git config –global user.email “xxxxxx@163.com”
命令 git config –list,查看是否设置成功。
生成ssh
ssh-keygen -C ‘xxxxxx@163.com’ -t rsa
一直回车(中途选择不输入密码)
(me is data)
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:XHfnbJG0ZBDx8LG9PoDI5flB2M1UvprGG+GvjJ3y4u8 xxx@163.com
The key’s randomart image is:
这返回来到显示数据放在根目录下来然后去根目录下找(每个人也许返回到位置都不一样呢)
到/root/.ssh下 copy id_rsa.pub
cd /root/.ssh
ls -a 显示隐藏文件
gedit id_rsa.pub
copy出data
进入你自己的github,进入Settings->SSH and GPG keys->New SSH key,然后在Key那