报错一
在创建新分支后向新分支commit代码时报错:
Gitunable to auto-detect email address (got '11372@DESKTOP-SVF4UTQ.(none)')
具体报错内容:
** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
报错原因:本次提交的码云账号和上次不一样,无法识别。
具体解决方法:
1.找到控制面板:
2.选择【用户账户】
3.选择【凭据管理器】->【windows凭据】
4.普通凭据中选择gitee的选项,编辑用户账号和密码
报错二
将本地分支同步到云端时报错:
unable to access 'https://gitee.com/vsdeveloper/vue_shop.git/': T
报错原因:
。。。把自己的代码push到别人的仓库导致报错403无权限
解决方法:
新建码云仓库重新根据配置:
因为已经有项目在本地,所以git全局设置后应该执行第二个【已有仓库?】设置,但会报错:
remote origin already exists
原因是clone别人的仓库在此基础上完成自己的代码,远程仓库已经存在。
解决方法是要先删除相关联的远程库:
1、先输入git remote rm origin 删除关联的origin的远程库
2、关联自己的仓库 git remote add origin https://gitee.com/xxxxxx.git
3、最后git push origin master,这样就推送到自己的仓库了。
结束,撒花~