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

标签 git bitbucket push 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 ......

这可能是什么问题?

最佳答案

原因: GitHub 几个月前弃用了对 TLS1.0 和 TLS1.1 的支持时出现了同样的错误消息。现在,Atlassian 似乎在 2018 年 8 月 6 日 (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。

( source )

关于git - Visual Studio 扩展未知错误 - 无法推送或获取任何内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51725278/

相关文章:

ruby-on-rails - 过度提交 RailsS​​chemaUpToDate 在 --run 时通过但在提交时失败

git - 这个分散思考的工作流程可以在 Git 中实现吗?

Eclipse 更新 2021-03 后 git auth 失败

javascript - 合并具有相同 id 的数组

git - 如何解决 Git "CONFLICT (modify/delete)"?

Git - 将推送的提交移动到不同的分支

git - Github 公钥的公共(public) URL 是什么

version-control - 选择 Mercurial 主机

git - 在不 merge 的情况下将更改推送到分支?

android - 华为push sdk for Android target 31