Unable to push commits

The last few days I have been experiencing issues with Visual Studio 2022 when attempting to push a new commit to my GitHub repositories. I will simply create a new commit as I usually do and then Push but I will encounter this error Failed to push the branch to the remote repository. See the Output window for more details. . This happens in all of my projects, not any specific ones etc. Any help would be much appreciated.

So what’s the output in the Output Window?

Yes, as @kingthorin pointed out I’d say check the logs :wink: You could also try doing a Git operation on the command line, like cloning or pushing to see what’s up.

I would have included it if it showed anything but its empty, nothing shows there

Hmm. It shouldn’t really be empty at all in VSCode. Anyway, what happens if you just execute Git operations (e.g. git fetch) from the command line?

Same error pops up, it just gets blocked

Ah, now I see my first mistake was not noticing you’re not using VS code but rather the Visual Studio product. To be honest, I’ve never used that product before so I’m a bit guessing from this point onwards.

Some things you could try (or rather, some things that could go wrong here):

  1. You might have set up an incorrect remote URL (either to a non-existing repo, or a typo, etc.)
  2. Authentication might be set up improperly: either using an improper method or invalid credentials
  3. There simply might be conflicts between your local branch and whatever you try to push (although, I would expect a bit more detailed error then)

I am, however, very sorry to report I have no idea how to check/fix these things in VS.

  1. Happens to all my projects that are published to github so I doubt the url is wrong, i also double checked
  2. i have logged off and logged back in with github and yet the same issue happens, maybe there is an extra auth step I missed? Cant find any
  3. I really doubt that since that happens to all my projects, even if I slightly change something minor