配置Git的SSH config文件,指定私钥
打开~/.ssh/config
文件,如果没有则新建
Host github.com
IdentityFile ~/.ssh/id_ed25519_github
Host gitlab.yourdomain.com
IdentityFile ~/.ssh/id_ed25519_gitlab
验证是否可以通过SSH连接
ssh -T git@gitlab.yourdomain.com
ssh -T git@github.com
用户名和邮箱根据需要配置
git config --global --list
git config --global --unset user.name
git config --global --unset user.email
git config --global user.name "your name"
git config --global user.email "email@xxx.com"
git config --local --list
git config --local user.name "your name"
git config --local user.email "email@xxx.com"
PREVIOUSNginx在Docker下的安装