在根目錄添加完文件之后,進行commit提示需要設置用戶名和用戶郵箱號
個人解決方法:配置git、創建ssh key配置
1、配置好用戶名(git使用的名稱)
git config --global user.name "aaa"
2、配置郵箱(git綁定的郵箱)
git config --global user.email "123@qq.com"
3、生成ssh key (git綁定的郵箱)
ssh-keygen -t rsa -C "123@qq.com"
輸入密碼之后,成功的現象
4、查看key 根據圖中顯示key生成的路徑
cat /Users/.../.ssh/id_rsa
5、git上配置ssh key
點擊個人頭像進入 settings
點擊ssh and GPG keys
新建一個ssh key
6、保存后key之后,再次commit和push
成功push到git倉庫