Azure devops Azure Devops不允许我推送更新

Azure devops Azure Devops不允许我推送更新,azure-devops,Azure Devops,我正在尝试向我们的Azure devops组织推送更新,但它给我带来了问题。我已经尝试了在web上找到的关于删除tenant.cache、用新的凭据管理器文件替换文件的所有建议。我已经尝试注销所有帐户并辞职,但到目前为止没有任何效果。这是visual studio告诉我的: Pushing master Logon failed, use ctrl+c to cancel basic credential prompt. Error: cannot spawn askpass: No such

我正在尝试向我们的Azure devops组织推送更新,但它给我带来了问题。我已经尝试了在web上找到的关于删除tenant.cache、用新的凭据管理器文件替换文件的所有建议。我已经尝试注销所有帐户并辞职,但到目前为止没有任何效果。这是visual studio告诉我的:

Pushing master
Logon failed, use ctrl+c to cancel basic credential prompt.
Error: cannot spawn askpass: No such file or directory
Error encountered while pushing to the remote repository: Git failed with a fatal error.
could not read Username for 'https://dev.azure.com': terminal prompts disabled
这是git日志响应:

07:49:26.686693 exec-cmd.c:236          trace: resolved executable dir: c:/program files (x86)/microsoft visual studio/2019/professional/common7/ide/commonextensions/microsoft/teamfoundation/team explorer/Git/mingw32/bin
07:49:26.885471 git.c:419               trace: built-in: git for-each-ref '--format='\''[%(refname)][%(objecttype)][%(objectname)][%(upstream)][%(push)][%(HEAD)]'\''' refs/heads/ refs/remotes/
07:49:27.205394 exec-cmd.c:236          trace: resolved executable dir: c:/program files (x86)/microsoft visual studio/2019/professional/common7/ide/commonextensions/microsoft/teamfoundation/team explorer/Git/mingw32/bin
07:49:27.292891 git.c:419               trace: built-in: git remote --verbose
07:49:27.360870 exec-cmd.c:236          trace: resolved executable dir: c:/program files (x86)/microsoft visual studio/2019/professional/common7/ide/commonextensions/microsoft/teamfoundation/team explorer/Git/mingw32/bin
07:49:27.448248 git.c:419               trace: built-in: git push --verbose --progress origin refs/heads/master:master
07:49:27.453255 run-command.c:643       trace: run_command: GIT_DIR=.git git remote-https origin https://dev.azure.com/{ORGNAME}/repo
07:49:27.499097 exec-cmd.c:236          trace: resolved executable dir: c:/program files (x86)/microsoft visual studio/2019/professional/common7/ide/commonextensions/microsoft/teamfoundation/team explorer/Git/mingw32/bin
07:49:27.529472 git.c:676               trace: exec: git-remote-https origin https://dev.azure.com/{ORGNAME}/repo
07:49:27.529472 run-command.c:643       trace: run_command: git-remote-https origin https://dev.azure.com/{ORGNAME}/repo
07:49:27.564880 exec-cmd.c:236          trace: resolved executable dir: c:/program files (x86)/microsoft visual studio/2019/professional/common7/ide/commonextensions/microsoft/teamfoundation/team explorer/Git/mingw32/bin
07:49:27.907250 run-command.c:643       trace: run_command: 'git credential-manager get'
07:49:28.121488 exec-cmd.c:236          trace: resolved executable dir: C:/program files (x86)/microsoft visual studio/2019/professional/common7/ide/commonextensions/microsoft/teamfoundation/team explorer/Git/mingw32/bin
07:49:28.152479 git.c:676               trace: exec: git-credential-manager get
07:49:28.152479 run-command.c:643       trace: run_command: git-credential-manager get
07:49:28.225935 ...\Common.cs:744       trace: [Main] git-credential-manager (v1.20.0) 'get'
07:49:28.280823 ...\Git\Where.cs:348    trace: [FindGitInstallations] found 1 Git installation(s).
07:49:28.308087 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 26 entries.
07:49:28.309084 ...\Common.cs:427       trace: [LoadOperationArguments] GCM_HTTP_USER_AGENT = 'git-credential-manager (Microsoft Windows NT 10.0.18362.0; Win32NT x64) CLR/4.0.30319 VS15/16.0.0'.
07:49:28.312076 ...\Common.cs:479       trace: [LoadOperationArguments] interactive = 'Auto'.
07:49:28.312076 ...\Common.cs:497       trace: [LoadOperationArguments] validate = 'True'.
07:49:28.312076 ...\Common.cs:513       trace: [LoadOperationArguments] modalPrompt = 'True'.
07:49:28.353964 ...\Common.cs:85        trace: [CreateAuthentication] detecting authority type for 'https://dev.azure.com/'.
07:49:28.640259 ...uthentication.cs:223 trace: [DetectAuthority] detected 'https://dev.azure.com/{ORGNAME}/' as Azure DevOps from GET response.
07:49:28.641289 ...uthentication.cs:291 trace: [DetectAuthority] tenant resource for 'https://dev.azure.com/{ORGNAME}/' is {00000000000000000000000000000000}.
07:49:28.641289 ...uthentication.cs:354 trace: [GetAuthentication] MSA authority detected.
07:49:28.647276 ...\Common.cs:205       trace: [CreateAuthentication] authority for 'https://dev.azure.com/' is Microsoft Live.
07:49:28.647276 ...\Common.cs:765       trace: [QueryCredentials] querying 'MicrosoftAccount' for credentials.
07:49:35.535626 ...\Authority.cs:195    trace: [InteractiveAcquireToken] authority host URL = 'https://login.microsoftonline.com/common', token acquisition for tenant [1bac877aca7c4b73b2c19dc2d3ed4df3] succeeded.
07:49:35.535626 ...Authentication.cs:86 trace: [InteractiveLogon] token 'https://dev.azure.com/' successfully acquired.
07:49:35.868880 ...\Authority.cs:533    trace: [GetAccessTokenRequestBody] creating access token scoped to 'vso.code_write vso.packaging' for 'https://dev.azure.com/{ORGNAME}/'
07:49:36.614779 ...\Authority.cs:131    trace: [GeneratePersonalAccessToken] failed to acquire personal access token for 'https://dev.azure.com/' [200].
07:49:36.614779 ...\Authority.cs:139    trace: [GeneratePersonalAccessToken] personal access token acquisition for 'https://dev.azure.com/' failed.
07:49:36.614779 ...\Common.cs:854       trace: [QueryCredentials] credentials for 'https://dev.azure.com/' not found.
07:49:36.614779 ...\Common.cs:709       trace: [LogEvent] Failed to retrieve Microsoft Live credentials for 'https://dev.azure.com/'.
07:49:36.616760 ...\Program.cs:414      trace: [Get] Logon failed, use ctrl+c to cancel basic credential prompt.
07:49:36.659579 run-command.c:643       trace: run_command: askpass 'Username for '\''https://dev.azure.com'\'': '
为了公司安全,我用{ORGNAME}/repo替换了组织名称和repo

所以它说它没能:

07:49:36.614779…\Authority.cs:139跟踪:[GeneratePersonalAccessToken]获取“”的个人访问令牌失败

但在团队资源管理器中,它允许我连接到回购协议:

Azure Devops不允许我推送更新

根据错误git日志:

git似乎没有获得PAT(或有效PAT)。您可以尝试使用以下方法解决此问题:

  • 删除
    https://dev.azure.com/
    哪些已被删除 存储在凭证管理器中

    然后再次按下,git将允许您输入回购凭证。输入可以访问Azure devops帐户的用户名(电子邮件地址)和密码后

  • 在中添加用户名和密码或个人访问令牌(PAT) git推送命令:

    git推送https://username:password(或PAT)@dev.azure.com/username/reponame.git


希望这能有所帮助。

我也试过了,很抱歉在我的帖子中忘了提到这一点。实际上,我让microsoft帮我做这件事,因为他们似乎认为这是因为我使用的是一个工作帐户。@Knowledge请确保您已删除存储在凭据管理器中的所有相关凭据。请尝试通过GitBash而不是VisualStuido进行推送。@Knowledge,你试过我答案中的第二个建议了吗?还是不行吗?@LeoLiu-MSFT是的,我两个都试过了,微软说这可能是我的工作账户的问题。
[InteractiveLogon] token 'https://dev.azure.com/' successfully acquired.
[GetAccessTokenRequestBody] creating access token scoped to 'vso.code_write vso.packaging' for 'https://dev.azure.com/{ORGNAME}/'
GeneratePersonalAccessToken] failed to acquire personal access token for 'https://dev.azure.com/' [200].