代码之家  ›  专栏  ›  技术社区  ›  Edu

无法在VisualStudio中使用git操作(git-askpass.exe:没有这样的文件或目录)

  •  3
  • Edu  · 技术社区  · 6 年前

    我一直在Visual Studio中使用BitBucket作为代码存储库,但今天我无法推送代码。

    我试图提取,它打开一个窗口,输入BitBucket凭据(用户名/电子邮件和密码),窗口关闭,并且VisualStudio给出一个错误:

    提取时遇到从原始位置提取错误:Git失败,原因是 在发送请求时。无法生成/c/程序文件 Studio / 2017 /社区/公共/ID/IDUpFiels/微软/TeaFiels/TeaStudio explorer/Git/mingw32/libexec/Git core/Git-askpass.exe:没有这样的文件或 目录无法读取的密码 ' https://username@bitbucket.org ':终端提示已禁用

    • 更新Visual Studio

    • 安装Visual Studio的BitBucket扩展

    • 手动清除和插入git凭据

    1 回复  |  直到 6 年前
        1
  •  5
  •   Edu    6 年前

    在尝试了不同的解决方案一段时间后,我在VisualStudio论坛中找到了解决方案: https://developercommunity.visualstudio.com/solutions/310409/view.html

    以下是对我有效的详细步骤:

    1. 安装最新的Git Credential Manager for Windows预发行版。 您可以在此处下载.exe: https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/v1.16.3

    2. 打开文件夹 C:\Program Files\Git\mingw64\libexec\git-core 使用windows文件资源管理器,按“修改日期”降序排列文件(最新的在先),并将前6个文件复制到 %DevEnvDir%\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\libexec\git-core .

      • 对我来说文件夹是 C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\libexec\git-core .

      • 如果不适合您,请使用“Developer Command Prompt for VS 2017”和“set”命令查看%DevEnvDir%的值。

    3. 替换目标文件夹中的文件。

        2
  •  0
  •   Samuel Farquhar    5 年前

    我用的是IntelliJ菜单中的按钮,它一直给我 “\intellij git askpass.sh” 错误和 https://github.com “:没有这样的文件或目录” 然后开始使用终端中的命令,并开始工作,例如:

    git push --all
    

    和/或具体地说,

    git push <remote> <branch>
    

    There's also a really good cheat sheet for anyone starting out using commands