Git 常见问题

这个问题网上固定的解决方案是全局设置用户名和邮箱:

bash

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

其实这个问题也可以在提交时单独设置

shell

git -c "user.name=Your Name" -c "user.email=Your email" commit "Your commit message"

shell

GIT_SSH_COMMAND='ssh  -i "/data/flexcloud/vscode/.ssh/id_rsa"' git push origin master

are you sure

如何想要忽略这个提示,可以在终端中输入👇

shell

GIT_SSH_COMMAND='ssh -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no"' git push origin master