SourceTree git push 报错:
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags origin master:master
Pushing to gitee.com:Y_MS/wenjuan.git
remote: Powered by [01;33mGITEE.COM [0m[[01;35mGNK-6.4[0m][0m
remote: error: GE007: Your push would publish a [01;31mprivate email address[0m.
remote: You can make your email public or [33mdisable this protection[0m by visiting:
remote: [01;36mhttps://gitee.com/profile/emails[0m
remote: error: hook declined to update refs/heads/master
To gitee.com:Y_MS/wenjuan.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'gitee.com:Y_MS/wenjuan.git'
解决办法:
根据你提供的信息,推送到远程仓库时出现了一个错误。错误信息显示你的推送包含了一个私人邮箱地址,而Gitee的保护机制拒绝了这次推送。
为了解决这个问题,你可以按照错误信息中提供的链接访问Gitee的个人资料页面,然后将你的邮箱设置为公开或禁用该保护机制。具体步骤如下:
访问链接:https://gitee.com/profile/emails
登录到你的Gitee账号。
在邮箱列表中找到你想要设置的邮箱地址,并选择将其设为公开或禁用保护机制。
保存更改。
例如我的设置:
完成上述步骤后,再次尝试推送到远程仓库,应该就能成功了。