首页 > 其他分享 >error: GH007: Your push would publish a private email address.

error: GH007: Your push would publish a private email address.

时间:2022-11-09 17:00:35浏览次数:63  
标签:git would -- publish private address email

背景

在新电脑上推送时出现这个邮件地址提示。

解决方法

  • 简单的方法是直接把 .gitconfig 这个文件中的 用户名和地址都改掉,改为网站提供的保密邮件地址。
  • 如果涉及到 github 和 gitee 等多仓库使用的情况,建议设置 仓库级别的 用户名和地址。保存到了 .git/config 中去了。
git config --local user.name "username"
git config --local user.email [email protected]
  • 然后,使用新的用户名和地址 重做 commit , git commit --amend --reset-author
  • 最后,重新推送即可。

参考

解决remote: error: GH007: Your push would publish a private email address.
https://blog.csdn.net/weixin_49393427/article/details/113832288

Git配置多用户和邮箱
https://blog.csdn.net/U_riel/article/details/102727018

标签:git,would,--,publish,private,address,email
From: https://www.cnblogs.com/ramlife/p/16874362.html

相关文章