一、安装完git查看版本 git --versiongit
二、配置用户名邮箱cookie
git config --global user.name "chencheng"session
git config --global user.email "15875658583@163.com"
ssh
三、设置下邮箱和用户名spa
git config user.nameblog
git config user.emailstring
四、查看是否有.ssh文件it
cd c:\user\ChenCheng\.sshio
五、进入根目录 cd ~class
六、生成ssh ssh-keygen -t rsa -C "15875658583@163.com" 按三次回车结束页面
七、进入和查看 cd ~/.ssh ls cat id_rsa.pub
遇到每次都要输入密码用一下命令配置
使用 git config --global credential.helper store 的方式永久记住帐号密码,只须要输入一次。
一、输入git config --global credential.helper store
二、检查 /home/用户名/.gitconfig 会新增一项 helper = store
若是成功了,只须要输入一次密码,就记录到本地,之后不须要再输入了(相似cookie和session)