git push 报错error: failed to push some refs to 'https://github.com/githubismylove/bestmvc.git'解决方案

[root@iZ5361zrqbnxubZ test5]# git push origin master
Username for ‘https://github.com’: [email protected]
Password for ‘https://[email protected]@github.com’:
Counting objects: 4, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 261 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
remote: error: GH007: Your push would publish a private email address.
remote: You can make your email public or disable this protection by visiting:
remote: http://github.com/settings/emails
To https://github.com/githubismylove/bestmvc.git
! [remote rejected] master -> master (push declined due to email privacy restrictions)
error: failed to push some refs to ‘https://github.com/githubismylove/bestmvc.git

解决方案:如果要通过git push 上传文件到github,那么对应的github账户对应的邮箱必须是公开的。
也就是登录github账户后-setting-Keep my email address private复选项不要打钩,参加下图:
在这里插入图片描述

发布了16 篇原创文章 · 获赞 0 · 访问量 674

猜你喜欢

转载自blog.csdn.net/yaqiang2017/article/details/94413112