生成密钥:
ssh-keygen
ssh-keygen -t rsa -C "adminTest@outlook.com"
配置账户邮箱认证:
git config --global user.name "用户名"
git config --global user.email "邮箱"
检查关联状况:
ssh -T git@gitee.com
手动关联Gitee仓库:
git init
git commit -m "信息"
git remote add origin 仓库地址
git push -u origin master #推送
git add .
git commit -m "提交的信息"
git remote add origin 远程仓库地址
git push -u origin 分支名
Gitee官方帮助:
- https://gitee.com/help/articles/4114#article-header0
- https://gitee.com/help/articles/4114#article-header0
参考网站:
https://blog.csdn.net/HockJerry/article/details/115350472
常见报错
如下图gitee推送不上去,是账户设置里面,勾选禁止命令行推送暴露个人邮箱
,取消即可。
另外不公开地址,需要使用系统分配的默认邮箱。