git安装使用

 
下载 git;https://git-scm.com
 

配置 git,进入 git bash

# 配置用户名

git config --global user.name "username"
//(名字)

# 配置邮箱

git config --global user.email "username@email.com"
//(注册账号时用的邮箱)

配置 ssh 免密登录

进入 git bash;使用:ssh-keygen -t rsa -C "xxxxx@xxxxx.com"命令。 连续三次回车。
一般用户目录下会有
或者 cat ~/.ssh/id_rsa.pub
 
登录进入 gitee,在设置里面找到 SSH KEY 将.pub 文件的内容粘贴进去
使用 ssh -T git@gitee.com 测试是否成功即可
 
posted @ 2022-03-24 23:20  梦醒如赦  阅读(29)  评论(0)    收藏  举报