GIT Repo Error: Failed to push to the remote repository

Viewed 3568

I am using Visual Studio 16.7 and pushing code with Team Explorer. I am not using CLI. This project has been assigned to a GIT repository that I setup months ago. For months, I have pushed code to it with no problems.

All of the sudden I am getting prompted for login when I click "Push" in TFS. After I try to login, it comes back with the error "Failed to push to the remote repository. See the Output window for more details." But the output window says nothing more than:

Time Elapsed: 00:00:00.2689158 ========== Finished ==========

By the way, I cannot fetch or pull either.

I have gone over all the settings on the GIT website and I cannot find anything restricting my access and I am the owner of the repo.

I can't tell if GIT is refusing my login or if it is reaching he repo and there is some other issue that it is not reporting back to me. I do not seem to find an event log anywhere.

I am able to login to the GIT portal (on the Web) just fine.

Of note, Windows Update updated my PC about a month ago to a new version of windows. It caused a lot of problems as all my Windows settings were no longer there. But I fixed that and I got them all back. Not sure if there is something windows related that is stopping a connection through TFS.

enter image description here

1 Answers

Based on your description and related link in comment, it seems that you are pushing the Git repo to the Github.

You could refer to this blog:

As mentioned in this previous blog post, GitHub no longer supports basic authentication using a username and password. Instead, we recommend using personal access tokens or the web application flow.

The method to connect to Github has changed.

To solve this issue, you could try the following script to upload the Git version to latest.

git update-git-for-windows

Then you will see the Web application login interface when you push the changes. Or you could use Access token or SSH key as auth method.

Here is a ticket with the similar issue, you could refer to it.

Related