Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
398 views
in Technique[技术] by (71.8m points)

git - Visual Studio - Azure Dev : failed to push the branch to the remote repository

I'm using VS2019 and Azure DevOps. I'm no expert at all on source control and i've only been using Azure Devops as a backup of my projects.

I recently had to have my computer reinstalled and started a new project. But when trying to push to Azure DevOps i'm getting the following error:

Failed to push the branch to the remote repository. See the Output window for more details.

Pushing master

Error encountered while pushing branch to the remote repository: Git failed with a fatal error. unable to update url base from redirection: asked for: https://dev.azure.com/...../info/refs?service=git-receive-pack redirect: https://spsprodweu4.vssps.visualstudio.com/_signin?

It seems i'm being redirected to the signin page. But i'm signed in in Visual Studio and i'm seeing other projects. How can i solve this?

question from:https://stackoverflow.com/questions/65921198/visual-studio-azure-dev-failed-to-push-the-branch-to-the-remote-repository

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It seems that your local credentials are mixed after reinstalled the computer, please clear the stored TFS credentials in Visual Studio 2017 and Git credentials by following below steps.

  • Close all Visual Studio instances, delete %LOCALAPPDATA%.IdentityService.
  • Clear TFS caches %LOCALAPPDATA%MicrosoftTeam Foundation7.0Cache
  • Clear all the browser caches especially for the stored password
  • Look in the Windows Credential manager and remove the TFS related credentials and Git credentials there enter image description here
  • Restart Visual Studio > Team Explorer > Manage Connections to check if the Enter credential dialog popup. Just try this several times or restart VS to popup it again.
  • Enter the user password, then Team Explorer > Manage Connections to connect to target project. See this thread for more details.

In addition, you could follow this doc: Connect from Visual Studio or Team Explorer to get more guidance.

Update If your access level is Stakeholder in this organization, you cannot contribute to Azure Repositories. And members of Project Collection Administrators group can change access level.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...