git - git-askpass.exe:没有这样的文件或目录无法读取用户名
问题描述
我想我已经对这个问题进行了相当多的研究,但我还没有找到相应的问题/解决方案。
试图达到的目标
将解决方案从 VS 2017 发布并推送到 Microsoft Visual Studio Team Services (VSTS)。
可重现的例子
已创建带有项目“ExampleProject”的新解决方案“GitExample”(/w“创建新的 Git 存储库”已选中)。
在 Team Explorer 窗口中,我选择“Push to Visual Studio Team Services”部分下的“Publish Git Repo”。我选择我的帐户和域,然后按“发布存储库”。
从 Git 打印以下错误消息。
Opening repositories:
c:\users\SampleUser\source\repos\PythonApplication4
Commit e3b04515 created locally in repository c:\users\SampleUser\source\repos\PythonApplication4
Error encountered while pushing branch to the remote repository: Git failed with a fatal error.
ArgumentNullException encountered.
Value cannot be null.
Parameter name: path
ArgumentNullException encountered.
Value cannot be null.
Parameter name: path
cannot spawn /C/Program Files/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/Git/mingw32/libexec/git-core/git-askpass.exe: No such file or directory
could not read Username for 'https://repodomain.visualstudio.com': terminal prompts disabled
Pushing to https://repodomain.visualstudio.com/_git/PythonApplication4
A new Git repository has been created for you in C:\Users\SampleUser\source\repos\GitExample.
Opening repositories:
C:\Users\SampleUser\source\repos\GitExample
Commit 5d8765b7 created locally in repository C:\Users\SampleUser\source\repos\GitExample
Opening repositories:
C:\Users\SampleUser\source\repos\GitExample
The calling thread cannot access this object because a different thread owns it.
Error encountered while pushing branch to the remote repository: Git failed with a fatal error.
ArgumentNullException encountered.
Value cannot be null.
Parameter name: path
ArgumentNullException encountered.
Value cannot be null.
Parameter name: path
cannot spawn /C/Program Files/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/Git/mingw32/libexec/git-core/git-askpass.exe: No such file or directory
could not read Username for 'https://repodomain.visualstudio.com': terminal prompts disabled
Pushing to https://repodomain.visualstudio.com/_git/GitExample
问题似乎出在Git Credential Manager for Windows上。但是,Windows 凭据管理器正确列出了 git:repodomain.visualstudio.com 以及正确的用户名和密码组合。
做了什么:
- 卸载 git for Windows 并在没有 Windows Credential Manager 的情况下重新安装。从 GitHub 存储库安装 Windows 凭据管理器。
- 修复 Visual Studio 2017 安装。
- 在凭据管理器中删除和创建登录
感谢您为此付出的时间和精力。
解决方案
请通过团队资源管理器中的管理连接检查您的电子邮件地址与 VSTS 帐户的连接。详细步骤如下:
在 VS -> Team Explorer -> Manage Connections -> Connect to a project -> 检查您是否可以连接到 VSTS 帐户/域 ( https://repodomain.visualstudio.com )。
此外,请检查您是否有权在 VSTS 帐户https://repodomain.visualstudio.com中创建新项目。检查权限的步骤如下:
在 VSTS 帐户安全页面(https://repodomain.visualstudio.com/_settings/security)-> 选择您所在的组-> 检查是否允许创建新项目的权限。
推荐阅读
- pandas - 使用 pandas 将时间戳插入 bigquery 表
- python-3.x - 如何对 csv 中属于特定对象的每一行的值求和?
- r - 那里真的没有适当的 R 消息框功能吗?
- javascript - 找不到 TimePicker 24 小时格式 javascript (CDN)
- visual-studio-code - 打开大文件后,VS Code 在重启时崩溃
- extjs - 控制器和视图之间的参数交换Extjs问题
- prolog - 月份与唯一值无关?
- django - get_object_or_404 最新 = True
- java - 如何在桶排序聚合期间在 Java Elasticsearch 客户端中指定 from 子句
- html - Bootstrap 4 - 在锚标签内包装卡片图像会在 IE 11 中创建空白