Windows Server 上的 Powershell 远程会话和 Git 凭据管理器

use*_*912 5 git powershell powershell-remoting git-credential-manager

我正在通过 PS 远程会话访问服务器。git pull我正在尝试从 github 存储库运行 a 。远程计算机上的 git 凭据存储在 Windows 凭据管理器中。但是我收到这个错误:

fatal: Unable to persist credentials with the 'wincredman' credential store.
See https://aka.ms/gcm/credstores for more information.
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No such file or directory
Run Code Online (Sandbox Code Playgroud)

无论我使用交互式会话还是Invoke-Command. 当我 RDP 进入远程服务器并在那里运行命令时,工作正常git pullgit fetch有没有办法在远程会话中访问 WCM?

小智 0

我遇到了同样的问题,并在这篇文章中找到了答案:

如何禁用 Windows 版 Git 凭据管理器?

我不需要缓存凭据,所以我只是禁用它。