我这是一个刚在github上新建的项目,然后用git clone下来的,
跟着github上提示的教程走的
…or create a new repository on the command line
echo "# gallery-by-react.github.io" >> README.md git init git add README.md git commit -m "first commit" git remote add origin git@github.com:zoujian3820/gallery-by-react.github.io.git git push -u origin master
如示,只要一git push 提交就报下面的错,
Administrator@PC-201612101710 MINGW32 /d/extract/project/gallery-by-react.github.io (master)
$ git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 237 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
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 git@github.com:zoujian3820/gallery-by-react.github.io.git
! [remote rejected] master -> master (push declined due to email privacy restrictions)
error: failed to push some refs to 'git@github.com:zoujian3820/gallery-by-react.github.io.git'
不知道什么原因,百度过一些贴子,
都是说GitHub远程仓库中的README.md文件不在本地仓库中,解决方案为:
git pull --rebase origin master
git push -u origin master
可试了好多遍还是一样的报错,重来也不行,git push -f 强制覆盖远程也不行,
报错内容一直为error: failed to push some refs to 'git@github.com:zoujian3820/gallery-by-react.github.io.git',求解,换别人的电脑也试了一遍, SSH keys 什么的都已经配好了,ssh -T git@github.com检测了下也ok了,求看到的朋友帮忙看看,感激不尽。
试试这个
在GitHub的你账号网页上右上角,个人的登录退出的位置,找到setting:
setting->emails->Keep my email address private,把这一项去掉勾选即可。
http://blog.csdn.net/jingfengvae/article/details/72859130
非常感谢!!忘了回复,按照你的办法试了下,解决了