Git 无法识别我在 RStudio 中的全局 user.email

Git does not recognize my global user.email inside RStudio

我试图在 RStudio 中提交我的脚本更改,但我总是收到关于没有 git 帐户可供参考的错误。

我已经在 RStudio 的终端中尝试 运行:

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

然后我确认我的账号被正确识别:

$ git config --global --list
user.email=my@email.com

我还刷新了 Git 选项卡,并重新打开提交 window,但没有用。

我检查了 Tools --> Version Control --> Project Setup...,它正确显示了我的项目 URL。

我希望在终端显示我的电子邮件后得到解决,但事实并非如此。

显然,解决方案是使用我的 user.name 而不是我的 user.email 登录:

git config --global user.name "Your Name"

确实,我已经把那行放在我的问题中,但我只尝试了 user.email 一个(我认为它们可以互换)。