这是问题https://www.npmjs.com/package/simple-git。我正在使用 npm 模块 simple-git 与本地 git-repository 一起工作。本地 git 存储库已经在本地结帐,我可以通过 git-bash 使用存储库(提交/推送/拉取所有工作)。同时,通过 simple-git 在同一存储库上执行的任何命令都要求我每次都输入用户名和密码。
如何让 simple-git 使用我现有的凭据并停止在每个 git 命令上询问我的用户名和密码?
PS 初始化 simple-git 时,我只需提供存储库的路径。这应该足够了,它应该使用 .git/config 文件。也许这个 .git/config 中的某些内容需要 / 可以设置以帮助它停止询问用户名和密码。