美文网首页
Github 提交报错(push declined due to

Github 提交报错(push declined due to

作者: wavesnow | 来源:发表于2020-04-14 20:39 被阅读0次

如果不想关闭隐私设置,可以通过修改 Email 来解决:

  • 使用命令查看当前的全局用户 Email:
git config --global user.email
  • 找到你 GitHub 给的推荐 Email: 在 settting --> Email --> keep my Email private 选项下的 Email; 格式是:{ID}+{username}@users.noreply.github.com

  • 用GitHub 给的推荐 Email重新设置你的全局用户 Email,也可以只设置本个项目的邮箱信息。

git config --global user.email {ID}+{username}@users.noreply.github.com
#or
git config user.email {ID}+{username}@users.noreply.github.com
  • 重置上次提交的作者信息
git commit --amend --reset-author
  • 提交 git push 如果没有其他问题,大功告成。

相关文章

网友评论

      本文标题:Github 提交报错(push declined due to

      本文链接:https://www.haomeiwen.com/subject/lmsxvhtx.html