git的使用

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

2、配置用户名邮箱

git config --global user.name "chencheng"

git config --global user.email "15875658583@163.com"

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 "15875658583@163.com"  按三次回车结束页面

 

 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)

posted @ 2019-04-18 10:23  他她  阅读(265)  评论(0编辑  收藏  举报