当我尝试通过 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 中的文件之上可解决此问题:
- 从 https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases 下载 zip 文件 gcmw-v1.16.3.zip
- 导航到 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://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/