繁体   English   中英

github 身份验证令牌存储在 Windows 的什么位置?

[英]Where is github authentication token stored on Windows?

如果我在私有存储库上运行类似于以下的命令:

git ls-remote https://github.com/org/repo.git

我收到以下提示。

在此处输入图像描述

I'm using https://gitforwindows.org and looking at the Process Explorer, it appears that the executable that produces this window is \mingw64\libexec\git-core\git-credential-manager.exe relative to Git for Windows installation文件夹。

当我输入凭据时,我从 Github 获得了 email,表示创建了一个新的身份验证令牌。

此令牌存储在我的 PC 上的什么位置? 当我重复上面的命令时,我不再收到提示 - 只要我不撤销 github web 站点上的令牌。

By default, Git will use the Windows Credential Manager for storing and retrieving Git credentials via Github for Windows desktop.

凭据管理器允许您查看和删除已保存的用于登录网站、连接的应用程序和网络的凭据。

要打开凭据管理器,请在任务栏和 select凭据管理器控制面板的搜索框中键入凭据管理器。 Select Web 凭据Windows 凭据以访问您要管理的凭据。

您将在GitHub - https://api.github.com/{username}上的ZAEA23489CE3AACD436406

迈克·麦金托什是对的。 以下是访问令牌的方法。

Install-Module CredentialManager -Scope AllUsers -Force

根据您的喜好更改上述命令的标志。 然后:

Get-StoredCredential -AsCredentialObject | %{$_} `
  | ?{ $_.targetName -like "*github.com*"} `
  | sort LastWritten `
  | select LastWritten,Targetname,Password

这将为您提供您可能已创建的令牌列表。 使用Get-Command -Module CredentialManager列出模块上所有可用的命令,您可以使用它来操作凭证存储。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM