当我尝试通过 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 ......
这里可能有什么问题?
Reason:几个月前 GitHub 弃用了对 TLS1.0 和 TLS1.1 的支持时,出现了同样的错误消息。现在看来 Atlassian 在 2018 年 8 月 6 日对 BitBucket 的网络进行了一些更改(https://blog.bitbucket.org/2018/08/06/update-ip-migration/ https://blog.bitbucket.org/2018/08/06/update-ip-migration/)。此更改可能与该问题有关。
解决方法:Visual Studio 2017 中捆绑的 Git-Credential-Manager-for-Windows 还不是最新版本。下载最新版本并将其放在 Visual Studio 2017 中的文件顶部可以修复该问题:
- 从以下位置下载 zip 文件 gcmw-v1.16.3.ziphttps://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases
- 导航到 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\libexec\ (或“丢失”git-askpass.exe 的任何位置)居住)
- 制作 git-core 文件夹的备份副本
- 将 zip 文件中的文件放在新 git-core 文件夹内容的顶部,并在提示处覆盖
如果配置了远程设置,似乎您还需要从远程设置中删除“登录”(即更改https://[电子邮件受保护]/myrepo/myproject.git https://login@bitbucket.org/myrepo/myproject.git to https://bitbucket.org/myrepo/myproject.git https://bitbucket.org/myrepo/myproject.git)并使用 Atlassian ID 和完整的电子邮件地址。
(source https://github.com/github/VisualStudio/issues/949)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)