Here is my error on visual studio. I can\'t figure out if there is a config to fix this. Additionally I am restricted from installing git command line tools.
You code written above is right, but if you can pull and can't push, but you can push just in console and not in VS, and you are behind a corporate proxy, then you might try another approach. It may work for you:
In the .gitconfig file write:
[credential]
authority = *the-token*"
Search for the file .gitconfig by command: git config --list --show-origin