一. 安装配置 git
1. Ubuntu 下安装 git
1 | user@ubuntu:~$ sudo apt-get install git |
2. 配置邮箱和用户名
1 | user@ubuntu:~$ git config --global user.name mz8023yt |
3. 配置命令别名
1 | user@ubuntu:~$ git config --global alias.st status |
4. 生成 ssh 秘钥对
1 | user@ubuntu:~$ ssh-keygen -t rsa -C mz8023yt@163.com |
5. 将 shh 公钥添加到代码托管平台
1 | user@ubuntu:~$ cat ~/.ssh/id_rsa.pub |
登录 github、coding、oschina,添加 shh 公钥。将 cat 打印出来的 id_rsa.pub 公钥添加到托管平台账户中。