首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Azure Devops不允许我推送更新

Azure Devops不允许我推送更新
EN

Stack Overflow用户
提问于 2019-11-21 12:57:17
回答 1查看 418关注 0票数 1

我试图推动我们的Azure组织的更新,这给我带来了问题。我已经尝试了我在网上找到的关于删除tenant.cache、用新的凭证管理器文件替换文件的所有建议。我试着注销所有账户,并辞职,但到目前为止,一切都不起作用。这就是视觉工作室告诉我的:

代码语言:javascript
复制
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日志响应:

代码语言:javascript
复制
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替换了组织名称和回购

所以它说它没有:

07:49:36.614779 ...\Authority.cs:139跟踪:为“https://dev.azure.com/”获取GeneratePersonalAccessToken个人访问令牌失败。

但是在中,它允许我连接到Repo:

EN

回答 1

Stack Overflow用户

发布于 2019-11-22 06:54:22

Azure Devops不允许我推送更新

根据错误git日志:

成功获得了

InteractiveLogon令牌'https://dev.azure.com/‘。GetAccessTokenRequestBody创建访问令牌的作用域为“vso.code_write vso.packaging”,用于“https://dev.azure.com/{ORGNAME}/”GeneratePersonalAccessToken],但未能获得“https://dev.azure.com/”200的个人访问令牌。

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

  • 删除存储在凭据管理器.

中的https://dev.azure.com/凭据。

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

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

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

希望这能有所帮助。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58975620

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档