Git 不需要用户名和密码。我怎样才能改变它呢?

Git DOES NOT require username and password. How can I change it to do so?

似乎 common scenario 是在一台安全的计算机上,并且在从 RStudio 将分支推送到 GitHub 时收到输入用户名和密码的提示。

我有相反的问题。我不记得我是怎么设置的,但它不要求用户名和密码,自动推送提交的分支。

如何反转设置以便每次都有提示?

首先,做:

git config credential.helper

如果这给你任何输出,那么你已经定义了一个凭据助手,它可能正在缓存你的凭据。

要禁用助手,请执行:

git config --unset credential.helper

根据定义助手的位置,您可能还需要包括 --system--global--local 之一。例如:

git config --global --unset credential.helper