我有credential.helper=manager-core,这是 Windows 凭据管理器的新助手。我不明白如果你可以让 git 用git credential fill.
重现步骤
git config --system --list。如果您运行的是Windows 2.29或更高版本的 Git,那么您应该能够credential.helper=manager-core在列表中看到。对于早期版本,credential.helper设置为manager而不是manager-core。我正在运行最新的Git For Windows 2.29.2,所以对我来说它返回了manager-core。git credential fill
protocol=https
host=github.com`
<HIT ENTER KEY TWICE, as A blank line signals input completion>
Run Code Online (Sandbox Code Playgroud)
我正在运行最新的Git For Windows 2.29.2,对我来说默认credential.helper设置为。manager-core我确实确认正在运行git config --system list。
我的 Git 安装显示它有两个凭证助手
version在 git 终端中运行命令确认它们的存在:
$ git credential-manager version
Git Credential Manager for Windows version 1.20.0
Run Code Online (Sandbox Code Playgroud)
$ git credential-manager-core --version
Git Credential Manager version 2.0.280-beta+1f4c6db90f (Windows, .NET Framework 4.0.30319.42000)
Run Code Online (Sandbox Code Playgroud)
现在看来 git 基本上可以使用三种方式来管理凭据:
(A)。Windows 凭证管理器(控制面板内的凭证管理器),
(二)。适用于 Windows 的 Git 凭据管理器,以及
(C)。Git Crednetial Manager 核心。
如果我的理解是正确的,那么根据这篇文章,它与控制面板的Windows Credential Manager …
运行 Git LFS 命令,例如
GIT_TRACE=1 git lfs locks
Run Code Online (Sandbox Code Playgroud)
显示系统 credential.helper 已被使用,即使它被本地配置覆盖。
跑步
git config --system -l
Run Code Online (Sandbox Code Playgroud)
列出“credential.helper=manager”
然而
git config --local -l
Run Code Online (Sandbox Code Playgroud)
仅列出 'credential.helper=other'
在启用跟踪器的情况下运行 Git LFS locks 命令会显示此行
run-command.c:663 trace: run_command: 'git credential-manager get'
Run Code Online (Sandbox Code Playgroud)
删除系统范围管理器
git config --system --unset credential.helper
Run Code Online (Sandbox Code Playgroud)
修复了问题,并且我的本地助手“其他”已正确使用。根据git 配置文档,每个级别都优于前一个级别,因此 Git LFS 不遵守 git 标准。有没有什么聪明的方法可以在不取消系统范围帮助程序的情况下完成这项工作,并且可能会破坏其他存储库的身份验证?
我正在通过 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 pull。git fetch有没有办法在远程会话中访问 WCM?
在我的 git 安装中是否有命令或其他方法来确定 Credential Manager 的版本?
我第一次使用Azure DevOps托管我的下一个项目。当我在Azure Devops上创建一个空项目时,我试图对其进行克隆。尝试克隆时,它要求我输入密码。我输入了它,并说我输入了错误的密码,但我知道自己输入的密码正确。
然后,我将用于max / linux的git-credential-manager安装到我的mac上。我尝试git pull从远程来源执行a ,但是它只是提示您像第一次输入密码,但失败了。
我还尝试在Azure Devops上使用“创建git凭据”功能,在其中可以指定新密码。失败也有同样的错误。
我在此处的存储库中提交了GitHub问题。我没有办法克隆我的项目吗?我的存储库的网址格式为https://yousefshanawany@dev.azure.com/...。
更新:我在Windows计算机上尝试了此操作,它弹出了一个对话框,可以正常运行。
似乎是一个简单的问题,但我找不到解决方案,在存储在缓存中的git 配置凭据(用户名和个人访问令牌)中,git config --list返回的凭据信息是这样的
credential.helper=cache
Run Code Online (Sandbox Code Playgroud)
是否可以从缓存中查看凭据,我尝试了以下三个位置
(repository_home) /.git/config- 没有关于用户名和密码的信息
~/.gitconfig - 在 repo 文件夹中找不到文件
我无法克隆或推送到我的服务器上的存储库。
我有一个裸存储库,它位于我尝试通过 访问的user@host目录中的一个目录。我曾经添加过我的 ssh 密钥。它要求我提供密码。然后我就可以成功了。home/user/test.gitgit clonessh-add <pathtokey>ssh user@host
但是,如果我尝试这样做,git clone ssh://user@host/~/test.git我会得到:
Cloning into 'test'...
user@host: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
也尝试过
git clone ssh://user@host/home/user/test.gitgit clone user@host:home/user/test.gitgit clone user@host:/home/user/test.git结果相同
我猜 git 凭证管理器没有拿起密钥?
服务器上/var/auth/log说
Feb 20 02:25:36 xxxxx sshd[24674]: Connection closed by authenticating user XXXX x.x.x.x port 56433 [preauth]
git …git ×8
windows ×2
azure ×1
azure-devops ×1
git-config ×1
git-lfs ×1
github ×1
powershell ×1
ssh ×1