【问题标题】:Location of ~/.git-credentials file in Windows 10?~/.git-credentials 文件在 Windows 10 中的位置?
【发布时间】:2019-02-12 11:05:12
【问题描述】:

我搜索但在我的 Windows 10 机器中找不到 ~/.git-credentials 的路径。 git documentation 表示它将用户名和密码以纯文本形式存储在 ~/.git-credentials 中。我想通过手动打开文件来验证它。

【问题讨论】:

  • 它在您的用户HOME 目录中。 ~ 是 Unix HOME

标签: windows git


【解决方案1】:

在 Windows 10 上,git 用户凭据现在与凭据管理器一起存储。

【讨论】:

  • 有办法改变吗?是否已写入用户选择的路径?
【解决方案2】:

它位于%UserProfile%\.git-credentials,对应于C:\Users\<username>\.git-credentials(除非您已修改注册表以将用户的配置文件目录移至别处)。

一般而言,~ 在 Linux 上是指用户的主目录,而许多在 Linux 上将数据存储在 ~ 中的跨平台工具(包括 git)也将其数据存储在 Windows 上的用户主目录中。

【讨论】:

  • 或者,如果您修改了注册表以更改用户目录,%UserProfile%\.git-credentials
  • 感谢 bud,不知道 ~ 在 windows 上等效
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-30
  • 1970-01-01
  • 2021-02-20
  • 2013-07-22
  • 2020-10-19
  • 2016-08-10
相关资源
最近更新 更多