Visual Studio未知错误的扩展 - 无法推送或获取任何内容

Use*_*987 13 git push bitbucket visual-studio-extensions bitbucket-server

当我尝试通过Visual Studio的Git扩展将任何内容推送到我的bitbucket存储库时出错:

Error encountered while pushing branch to the remote repository: Git failed with a fatal error.
HttpRequestException encountered.
   An error occurred while sending the request.
cannot spawn /C/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/Git/mingw32/libexec/git-core/git-askpass.exe: No such file or directory
could not read Password for ......
Run Code Online (Sandbox Code Playgroud)

这可能是什么问题?

Vla*_*nko 16

原因:同样的错误消息是几个月前GitHub弃用了对TLS1.0和TLS1.1的支持.现在,看起来Atlassian在8月18日(https://blog.bitbucket.org/2018/08/06/update-ip-migration/)对BitBucket的网络进行了一些更改.这种变化可能与问题有关.

解决方法: Visual Studio 2017中捆绑的Git-Credential-Manager-for-Windows尚未发布最新版本.下载最新版本并将其置于Visual Studio 2017中的文件之上可解决此问题:

  1. https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases下载zip文件gcmw-v1.16.3.zip
  2. 导航到C:\ Program Files(x86)\ Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\libexec \(或者您'遗失'git-askpass.exe的任何地方居住)
  3. 制作git-core文件夹的备份副本
  4. 将zip文件中的文件放在新git-core文件夹的内容之上,并在提示时覆盖

此外,您似乎需要从远程设置中删除"登录"(如果已配置)(即将https://login@bitbucket.org/myrepo/myproject.git更改为https://bitbucket.org/myrepo/myproject.git)使用Atlassian ID代替完整的电子邮件.

(来源)


Moo*_*oon 4

它似乎从几个小时前开始就影响了一些 Visual Studio 用户,即使在此之前环境没有发生任何变化。Git 与 Visual Studio 的集成显然出现了问题。

目前有一种解决方法,您可以在存储库的远程设置中设置密码,如此处所示但请注意,它是不安全的,因为它需要以纯文本形式存储密码。

另一种解决方法是使用命令行使用 Git。

第三种解决方法(我也发现最好的一种)是配置 SSH 密钥身份验证。截至目前,它似乎可以与 Visual Studio 2017 一起使用,没有任何问题。这是我选择的解决方案。