Git clone over http 一直要求输入用户名和密码,但不起作用

Git clone over http keeps asking for username and password, but not at work

在工作中我们有 GitHub 企业,在家里只是普通 GitHub。

即使我通过 http 不是 ssh 进行克隆,在工作中,每当我提交时,它 从不 询问我的用户名或密码。

在家里,我必须使用 ssh 才能做到这一点,但是使用 http,它总是要求我。

工作时从来不问我,这是因为 GitHub 企业,还是因为他们将用户名和密码存储在某处所以 git 总是知道?

如果是后者,我该如何在我的电脑上执行此操作?

谢谢

在家里,尝试使用 credential helper 缓存您的 https 凭据。

在 Windows:

git config credential.helper manager

这将使用 Windows 凭据管理器来缓存它们。