@@ -14,15 +14,52 @@ PORT=442 # gost 端口号
1414SERVICE=https # 更新域名使用的服务
1515mail=yunbinliu@outlook.com # 邮箱
1616
17- log_info " 1. 更新系统... "
17+ log_info " 1. 更新系统"
1818apt -y update # 更新软件源
1919apt -y upgrade # 更新软件
2020apt -y autoremove # 卸载没用的软件
2121
22- log_info " 2. 安装软件..."
23- apt -y install certbot firewalld cron man-db g++ vim lrzsz man-db
24- which -s docker || bash <( curl -fsSL https://get.docker.com) # 安装 docker
25- yes | unminimize # 解压 man-db
22+ log_info " 2. 安装软件"
23+ apt -y install certbot firewalld cron man-db g++ vim lrzsz man-db git icdiff # 安装常用软件
24+ which -s docker || bash <( curl -fsSL https://get.docker.com) # 安装 docker
25+ echo y | unminimize # 解压 man-db
26+
27+ log_info " 3. 配置 Git"
28+ log_info " 3.1 配置用户名"
29+ git config --global user.name " Yunbin Liu"
30+
31+ log_info " 3.2 配置邮箱"
32+ git config --global user.email yunbinliu@outlook.com
33+
34+ log_info " 3.3 配置编辑器"
35+ git config --global core.editor vim
36+
37+ log_info " 3.4 配置日期格式"
38+ git config --global log.date iso
39+
40+ log_info " 3.5 配置简要命令"
41+ git config --global alias.co checkout
42+ git config --global alias.br branch
43+ git config --global alias.ci commit
44+ git config --global alias.st status
45+
46+ log_info " 3.6 配置日志显示格式"
47+ git config --global alias.lg " log --pretty=format:'%ad %h %s %d %C(bold)%an%Creset' --graph"
48+
49+ log_info " 3.7 中文显示不乱码"
50+ git config --global core.quotepath false
51+
52+ log_info " 3.8 查看配置"
53+ git config --global --list
54+
55+ log_info " 3.9 生成秘钥"
56+ [[ -f ~ /.ssh/id_ed25519.pub ]] || ssh-keygen -t ed25519 -f ~ /.ssh/id_ed25519 -N " "
57+
58+ log_info " 3.10 复制公钥到 GitHub, 按回车继续..."
59+ read
60+
61+ log_info " 3.11 测试连接"
62+ ssh -T git@github.com -o BatchMode=yes -o StrictHostKeyChecking=no
2663
2764exit 0
2865
@@ -103,3 +140,4 @@ log_info "完成"
103140# . ~/.bashrc # 使 bashrc 生效
104141# ```
105142#
143+
0 commit comments