gpt4 book ai didi

Git 凭据帮助程序不适用于 linux 的 Windows 子系统

转载 作者:行者123 更新时间:2023-12-04 00:01:09 26 4
gpt4 key购买 nike

我在 Windows 10 上的 WSL 中使用 Ubuntu,并且我在 WSL 中安装了 git 并定期使用它。我有一个非常烦人的问题,我尝试缓存我的 github 凭据,因此我不必在提交时不断输入我的用户名/密码,但它不起作用。我遵循 github 逐字提供的确切说明。首先我输入:

git config --global credential.helper cache

然后我输入:
git config --global credential.helper 'cache --timeout=2629800'

但是没有任何 react ,我仍然需要不断输入我的github用户名和密码

编辑:

澄清一下,我是通过 ubuntu wsl 上的 bash 终端完成所有这些操作的,我没有使用 Windows 版本的 git。我正在使用 ubuntu 中包含的 git 版本。我输入的所有这些命令都是 linux 命令。

最佳答案

可能原因是 WSL 中对 Unix 域套接字的支持不完整

您可以改用 Windows 凭据管理器:https://www.edwardthomson.com/blog/git_credential_manager_with_windows_subsystem_for_linux.html

从链接,这里是如何启用它:

git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager.exe"

关于Git 凭据帮助程序不适用于 linux 的 Windows 子系统,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61429466/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com