报错信息:
Pushing to https://github.com/***.git POST git-receive-pack (1288 bytes) 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/***.git ! [remote rejected] master -> master (push declined due to email privacy restrictions) error: failed to push some refs to 'https://github.com/***.git'

出现报错的场景
由于使用公司电脑,设置了global的全局git账号。我在自己的github仓库,修改了name和email,然后就push不了了。

解决方法:
网上还有一种方法:
Open your GitHub account, and go to Settings > Emails.
Select the Keep my email address private check box.
就是将email的私有设置为公开,可我就是不想公开,便找到如下解决方案。

  1. 如果也是配置了name和email,则先确认仓库的.git 中的config的是否正确:
    git config user.name "{name}" 【就是github中Public profile下的Name】
    git config user.email "{username}@users.noreply.github.com"【就是github中点击头像,Signed in as 后面的那个名字,也是生成代码路径中标识的那个名字】
    其实,这个用户名和邮箱,也是第一次检出代码时那个。

  2. 跳出后.git文件夹,在仓库文件夹下,输入命令行:
    git commit --amend --reset-author
    esc
    :wq
    然后使用sourceTree就push成功了。

解决方法参考:
https://stackoverflow.com/questions/43863522/your-push-would-publish-a-private-email-address-error

git push报错 emote: error: GH007相关推荐

  1. git push报错:error: failed to push some refs to ‘https:/

    解决在git push时的报错:error: failed to push some refs to 'https:/ // 错误如下 hint: Updates were rejected beca ...

  2. phpstorm 用git pull或者 git push报错 protocol error: bad line length character: Acti

    首先排除是ssh的key的配置问题,因为用git本身可以正常pull和push 解决方案: 在phpstorm中配置git 选择SSH executable 从 Built-in 改为 Native ...

  3. git push报错 protocol error: bad line length character: Acti

    idea配置git 选择SSH executable 从 Built-in 改为 Native 重启idea即可

  4. git push 报错 ---error: commit 8aa8e31: email address yin.jiaqing@.....com is not registered in your

    git push 报错: error: commit 8aa8e31: email address yin.jiaqing@haustart.com is not registered in your ...

  5. git push 报错Push rejected、 remote unpack failed 、unpacker error、 failed to push some refs to

    git push 报错Push rejected. remote unpack failed .unpacker error. failed to push some refs to 1.error: ...

  6. git push报错:remote: error: refusing to update checked out branch: refs/heads/master

    远程仓库通过git init初始化了一个项目,没有clone到本地,本地新建了一个项目,关联本地项目和远程仓库(参见IDEA新建本地项目关联远程git仓库 )后git push报错: wulf@wul ...

  7. git push 报错 Empty reply from server 或 Failed to connect to github.com port 443: Time out

    git push 报错 Empty reply from server 或 Failed to connect to github.com port 443: Time out 问题出现 报错信息 问 ...

  8. git push报错:fatal: unable to access ‘https://XXXX.git/‘: Peer‘s Certificate issuer is not recognized.

    推镜像的时候,git push报错:fatal: unable to access 'https://XXXX.git/': Peer's Certificate issuer is not reco ...

  9. git push报错 DENIED by fallthru(or you mis-spelled reponame)

    git push报错 DENIED by fallthru(or you mis-spelled reponame) 百度半天都说是公钥私钥问题 最后发现是管理员没开push权限

最新文章

  1. iOS开发 - OC - PCH文件使用
  2. mui汉字图标_MUI从入门到项目实战(三)增加自定义icon图标
  3. 使用Facebook方法处理复杂问题
  4. 8.Boost之unordered_set
  5. python实现辗转相除法求最大公约数和最小公倍数
  6. SpringBoot运行原理初探
  7. Dubbo是如何进行远程服务调用的?(源码流程跟踪)
  8. Markdown——编辑器语法——背景色
  9. opencv测试代码_玩转OpenCv(二):安装vs2010和opencv3
  10. JSP-tomcat设置编码格式 配置utf-8(以防网页框以及网页显示的时候中文乱码)
  11. Xcode8写代码闪退
  12. 金山wps c++开发一面总结
  13. 淘宝天猫自动领取喵币
  14. 应届毕业生面试软件测试...测试小白如何抓住机会
  15. 在破败中崛起,在寂灭中复苏。   沧海成尘,雷电枯竭,那一缕幽雾又一次临近大地,世间的枷锁被打开了,一个全新的世界就此揭开神秘的一角……
  16. 2022年二级建造师考试机电工程练习题及答案
  17. Epoch, Batch, Iteration 区别
  18. 行为识别论文阅读(2)——3D Human Sensing, Action and Emotion Recognition in Robot Assisted Therapy of Children
  19. python趣味编程-python趣味入门——写几个常玩的游戏
  20. java aes 工具类_AESUtil Java AES 加密解密工具类

热门文章

  1. openCV色彩空间转换
  2. 【数据中台】数据质量原因分析
  3. 基金使用计划 数学建模 matlab,数学建模论文-基金使用计划
  4. c语言实现图片缩放,图片缩放与合并(C语言实现)
  5. 第十四届中北大学ACM程序设计竞赛 J.ZBT的游戏
  6. jqgrid表格最右侧空出一截问题
  7. web前端开发论文写作_现在入行 web前端开发 晚了?不看数据你根本不知道这些...
  8. 5G无线网络智能规划技术的探索与实践
  9. Allegro中如何进行尺寸标注
  10. python pandas 实战 百度音乐歌单 数据分析