git - 为什么 git log 会显示我的密码?

标签 git password-protection

当我输入 git log 时,提交的结果列表在我的用户名后的括号 <> 中显示我的密码,如下所示:

commit 5ff14f929e2244f388a41b6f711e7b9b58c57cb2
Author: herman <MyPassw0rd>
Date:   Wed Aug 29 10:00:39 2018 +0200

initial commit 

为什么会这样,我该如何解决?

最佳答案

这不应该是您的密码,而应该是您的电子邮件。虽然我不知道您是如何在电子邮件设置中输入密码的,但您可以使用以下命令在当前项目中设置您的电子邮件

git config user.email "email@example.com"

或全局使用
git config --global user.email "email@example.com"

此外,您可能应该更改密码。

关于git - 为什么 git log 会显示我的密码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52076096/

相关文章:

python - Bokeh 服务器的简单用户名和密码保护

git - 有谁知道如何让 github ssh 在 2019 年 12 月在 WSL(Linux 的 Windows 子系统)上正确工作

Git 在 checkout 时更改了我的文件权限

git - 拆分 git 中的第一个提交

iOS密码才能使用该应用程序?

python - Django - 如何保存我的散列密码

linux - 命令行参数的Shell脚本密码安全

c# - ASP.NET MVC 无密码身份登录

node.js - 私有(private) github repo ,因为依赖与 npm 安装无关

git - 如何自动更新git仓库?