【问题标题】:git stores wrong credentials everytimegit每次都存储错误的凭据
【发布时间】:2021-03-06 22:21:38
【问题描述】:

我已被授予少数 git 存储库的拉/推权。当我第一次安装 git 时,它要求输入用户名和密码。在那之后,我只是用来写 git checkout . git pull --rebase 但是现在自从几次拉动或推送任何文件时,git bash 都会要求提供凭据。

当我查看 Windows 凭据时,我看到保存了错误的密码。即使在编辑后它也不会改变。当我编辑并保存正确的密码时,它会恢复到以前的状态(密码错误)。

我该怎么办?

【问题讨论】:

    标签: git github git-bash


    【解决方案1】:

    根据凭证助手用户(键入 git config credential.helper),您应该remove the cached credentials from that helper

    但请确保有问题的本地存储库确实使用了 HTTPS URL

    cd /path/to/existing/local/repository
    git remote -v
    

    如果不是以 HTTPS 开头,那么问题就不同了。

    【讨论】:

      猜你喜欢
      • 2018-12-28
      • 2019-10-04
      • 2016-05-05
      • 1970-01-01
      • 1970-01-01
      • 2016-08-02
      • 2020-03-04
      • 1970-01-01
      • 2021-04-07
      相关资源
      最近更新 更多