Knowledge
Knowledge

Reputation: 134

Azure Devops is not allowing me to push updates

I am trying to push updates to our Azure devops organization and it's giving me problems. I've tried all the suggestions that I have found on the web about deleting tenant.cache, replacing files with new credential manager files. I've tried signing out of all accounts and resigning in and nothing is working so far. This is what visual studio is telling me:

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

And this is the git log response:

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'\'': '

I replaced organization name and repo with {ORGNAME}/repo for company safety

So it's saying it failed to:

07:49:36.614779 ...\Authority.cs:139 trace: [GeneratePersonalAccessToken] personal access token acquisition for 'https://dev.azure.com/' failed.

But in the team explorer it lets me connect to the Repo:

team explorer

Upvotes: 1

Views: 668

Answers (1)

Leo Liu
Leo Liu

Reputation: 76840

Azure Devops is not allowing me to push updates

According to the error git log:

[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].

It seems git did not get PAT(or valid PAT). You could try to use following method to resolve this issue:

  • Remove the credentials for https://dev.azure.com/ which have been stored in Credential Manager.

    enter image description here

    Then push again, git will let you input the credential for the repo. After inputing the username(email address) and password which can access the Azure devops account.

  • Add the username & password or the Personal Access Token (PAT) in the git push command:

    git push https://username:password(or PAT)@dev.azure.com/username/reponame.git

Hope this helps.

Upvotes: 2

Related Questions