Push to GIT failed after latest update

Clarence Tunstall 21 Reputation points
2021-07-21T02:11:57.407+00:00

I get the error message "Failed to push to the remote repository" but when I check online, the code update exists. Earlier right after the update, I created a new branch and pushed that change and got a fail on that as well, but saw that it also had created the remote branch. The only resource that comes close to a similar situation Microsoft closed the issue because one work around to update the windows GIT to the latest version seemed to work, but that was for those who have it installed. I checked to see if I had it installed and I do not so there is no update to resolve. I've been trying to find out if its now required, but can't get an answer. This seems very untrustworthy and until this is resolved I feel it's only a matter of time before something catastrophic happens and I lose code. Its obvious some error is occurring so I'd like to resolve that error and not be satisfied that because the pushes are working, I should ignore it.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,136 questions
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 30,811 Reputation points Microsoft Vendor
    2021-07-22T06:23:09.97+00:00

    Hi anonymous user ,

    Thanks for the reply and the detailed error message.

    Perhaps you need to configure some Git Global Settings. From VS > Tools > Options > Source Control > Git Global Settings. And mainly focus on this four options:

    1). Prune remote branches during fetch:
    2). Rebase local branch when pulling:
    3). Cryptographic network provider:
    4). Credential helper:

    Best Regards,
    Tianyu

    • If the answer is helpful, please click "Accept Answer" and upvote it.
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Clarence Tunstall 21 Reputation points
    2021-07-23T14:00:25.697+00:00

    ok the issue did not occur on the last push when I tested, but I don't think following these instructions was the issue rather than resetting my login which would explain how my organization wasn't set. Why it's a fatal error I don't know. I believe after the update, I needed to reset my credentials by disconnecting and logging back in.

    1. When I reloaded VS 2019, I got a message about not being connected, then reconnected, checked these options, then made a change, committed, then pushed it and worked without the error message
    2. After checking these options and reviewing the documentation about what they meant, I made sure the options I wanted were selected. But they were.
    3. To check if the Credential Helper was the issue I set it to a different option and it committed and pushed without the error, but I was asked to log in.

    Documentation Used to Understand Options
    https://learn.microsoft.com/en-us/visualstudio/version-control/git-settings?view=vs-2019

    specifically the "Credential Helper" I made sure it was set to "unset" as the only option for me because I had none of the software installed on my machine for the listed options as explained in the documentation.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.