SourceTree git push代码报错:git -c diff.mnemonicprefix=false -c core.quotepath=false......

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账号。
在邮箱列表中找到你想要设置的邮箱地址,并选择将其设为公开或禁用保护机制。
保存更改。

例如我的设置:
在这里插入图片描述

完成上述步骤后,再次尝试推送到远程仓库,应该就能成功了。

以上

完,祝你成功。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值