代码之家  ›  专栏  ›  技术社区  ›  Jeric Cruz

无法使用VS团队资源管理器(Bitbucket git)拉取

  •  10
  • Jeric Cruz  · 技术社区  · 6 年前

    每当我拉/取或推时,我的VS 2017团队资源管理器都会出错。

    Git failed with a fatal error.
    HttpRequestException encountered.
       An error occurred while sending the request.
    cannot spawn /C/Program Files/Git/mingw64/libexec/git-core/git-askpass.exe: No error
    could not read Password for 'https://<myusername>@bitbucket.org': terminal prompts disabled.
    

    我试图通过指示以下内容来设置密码:

    https://<myusername>:<mypassword>@bitbucket.org
    

    还没修好。但当我使用SourceTree时,一切都很好。

    如何修复此问题,以便再次使用VS团队资源管理器进行拉/推操作?

    我使用的是:

    • VS 2017社区15.7.6
    • Git版本2.18.0
    • 比特桶

    提前谢谢。

    4 回复  |  直到 6 年前
        1
  •  5
  •   robob    6 年前

    Git for Windows中有一个问题,Microsoft正在监视解决方案,以便使用修补程序发布新版本的VS。

    https://developercommunity.visualstudio.com/content/problem/266473/sync-commit-git-failed-with-a-fatal-error.html

    -----最后我决定采取这些步骤--------------

    1) 删除凭据管理器中的凭据

    2) 重命名或删除“C:/Program Files(x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer”中的Git目录

    3) 安装软件包“ https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/v1.17.0 "

    4) 当VS请求BitBucket凭据时,插入它们

    只有这些序列对我有用。

        2
  •  8
  •   dafriskymonkey    6 年前

    同样的,我相信是从比特桶的角度。

    以下是我们的工作:

    删除 吉特 相关凭据存储在“控制面板\所有控制面板项\凭据管理器”中的Windows凭据中

    链接到SO here

    然后使用此命令:

    git remote set-url origin https://name:password@bitbucket.org/repo.git

    here 是这个的来源

        3
  •  2
  •   Ongun23    6 年前

    Bitbucket的身份验证器当前失败。这是一个悬而未决的问题。 https://bitbucket.org/site/master/issues/16892/cannot-fetch-or-push-using-visual-studio

    如果你能冒纯用户名的风险:密码格式暂时使用for,就可以解决问题。

        4
  •  1
  •   Gaoxin Huang    6 年前

    我用 git凭据存储 现在。我想这可能是目前最好的办法。正如我在这个链接中提到的 here .

    这是链接这里是如何使用 git凭据存储 . 如果你想在全球范围内拥有“git凭证存储”。您可以使用以下命令:

    git配置--全局凭据.helper

    实际上,您将用户名和密码保存在本地。它只会询问您的用户名和密码一次。

    否则,您可以使用 宋承宪 (在我的VPN上不起作用)。