Windows客户端中的git pull-over ssh在开始使用令牌后挂起
我使用的是WindowsSSH本机服务器(附带RS4)。 我的客户端是Windows和Linux 我过去一直使用git从ssh(Windows/Linux)拉到Windows机器,没有任何问题。 今天,我开始使用https上的令牌,从那时起,我无法使用ssh进行git拉取,这个过程在Windows和Linux客户端中都永远挂起 git pull在本地工作正常,其他git pull函数(如config/remote/etc)在ssh上工作,没有任何问题 我还尝试在ssh上运行python脚本,在远程机器上执行git pull,但效果不佳,它也挂起了 在远程任务管理器中,我看到了一堆git进程,如:git-credential-manager.exe、git.exe、git-remote-https.exe——这意味着需要与其中一个程序交互,但它们是在后台运行的,因为它们是通过ssh启动的 如果我这样做:Windows客户端中的git pull-over ssh在开始使用令牌后挂起,git,ssh,Git,Ssh,我使用的是WindowsSSH本机服务器(附带RS4)。 我的客户端是Windows和Linux 我过去一直使用git从ssh(Windows/Linux)拉到Windows机器,没有任何问题。 今天,我开始使用https上的令牌,从那时起,我无法使用ssh进行git拉取,这个过程在Windows和Linux客户端中都永远挂起 git pull在本地工作正常,其他git pull函数(如config/remote/etc)在ssh上工作,没有任何问题 我还尝试在ssh上运行python脚本,在远
git pull https://user:password@github.com/path/repo
它可以工作,但我不想在我的代码中使用纯文本密码。
我怎样才能避开这个问题
谢谢。由于git-credential-manager.exe(它是git for Windows的一部分)在ssh会话期间在远程计算机的后台弹出,因此出现此问题 要解决此问题,应在git for Windows安装期间首先卸载/不安装git credential manager/运行以下git命令来禁用git credential manager:
config --global --unset credential.helper
这将全局禁用凭据帮助程序。
如果要将密码保存在.git凭据文件中(如在Linux中),请运行:
第一次输入密码时,.git credential文件将在您的主目录中创建
SSH将不再挂起。非常感谢!我试图部署RunDeck节点,但遇到了类似的情况。实际上,我还更改了c:\Program Files\Git\mingw64\etc\gitconfig中的配置,问题得到了解决。
git config credential.helper store