【发布时间】:2018-07-10 14:23:40
【问题描述】:
我想我已经对这个问题进行了相当多的研究,但我还没有找到相应的问题/解决方案。
想要达到的目标
从 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 凭据管理器的情况下重新安装。从 GitHub 存储库安装 Windows 凭据管理器。
- 修复 Visual Studio 2017 安装。
- 在凭据管理器中删除和创建登录
感谢您为此付出的时间和精力。
【问题讨论】:
标签: git visual-studio azure-devops