git简单配置

1、安装完git查看版本 git --version

2、配置用户名邮箱

git config --global user.name "chencheng"

git config --global user.email "[email protected]"

3、设置下邮箱和用户名

git config user.name

git config user.email

4、查看是否有.ssh文件

cd c:\user\ChenCheng\.ssh

5、进入根目录 cd ~

6、生成ssh  ssh-keygen -t rsa -C "[email protected]"  按三次回车结束页面

 7、进入和查看 cd ~/.ssh  ls  cat id_rsa.pub

遇到每次都要输入密码用一下命令配置

使用 git config --global credential.helper store 的方式永久记住账号密码,只需要输入一次。
1、输入git config --global credential.helper store
2、检查 /home/用户名/.gitconfig 会新增一项 helper = store

 如果成功了,只需要输入一次密码,就记录到本地,以后不需要再输入了(类似cookie和session)

猜你喜欢

转载自www.cnblogs.com/chen-cheng/p/9739879.html
今日推荐