This is the URL to which I need to push:
https://myVault.visualstudio.com/[root]/cxmlhub
When I try to do a git push, I get this error:
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://myVault.visualstudio.com/[root]%2Fcxmlhub/info/refs&service=git-receive-pack
redirect:
https://spsprodcus1.vssps.visualstudio.com/_signin?realm=myVault.visualstudio.com&reply_to=https%3A%2F%2FmyVault.visualstudio.com [a whole long string of foobar nonesense I don't understand]
Pushing to
When I first got this error, I found all these threads here on SO that deal with this error (like this and this and this and this.) In looking at those threads, I realized the solution was to change the URL to which GIT was trying to push. It was indeed wrong.
I found this thread that told me how to change the URL: How to change the URI (URL) for a remote Git repository?
Following the steps in the anwer, I changed the remote origin
URL to what it should be:
https://myVault.visualstudio.com/[root]/cxmlhub
When I do git remote -v
I get back the correct URL for both fetch
and push
.
But now, when I try and push, I still get the same error, but with different URL's. The Error I am getting now is the one that's above. Some notes on that error:
1) I don't know why it seems to be pushing to the correct URL but this tacked on to the end:
/info/refs&service=git-receive-pack
2) I REALLY don't understant the redirect
part of the error message with the really bizzare URL.
3) At the end of the message, in the Pushing to
part, it actually gets the URL correct. But, it didn't actually do the push.
What am I doing wrong, and how do I fix it?
Thanks!
EDIT: Not a duplicate of git push gives fatal: unable to update url base from redirection:. I already linked to this thread, explained that I implemented the solution and that I now get a slightly different error. I feel like the person who marked this as a duplicate didn't actually read the entire post.