Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot push local Git repo to Visual Studio Online project

I have a local repo generated using Visual STudio 2013 that I am trying to push to VSO. The local repo is a simple C# command line application with Git source control.

With the goal of uploading my local repo to VSO, I created a new project on VSO, selected git as my choice of version control, then I entered the 'Code' tab, and saw the following message .

From the command line
You can push the project using the following commands:
git remote add origin https://xxxxxxxxxx.visualstudio.com/DefaultCollection/_git/SharedProj4
git push -u origin --all

Following which, I promptly fired up my powershell (which I use for Git) and issued the two commands one after another. When I issued the second command, I got a message telling me to enter my visual studio online username and password. Alright, I keyed in my username and pressed enter, then on the password prompt, it simply failed to receive any text input from my keyboard. I would see a blinking cursor which simply wouldnt advance, no matter how much I hounded my keyboard. Of course, I tried to do my best, I typed my password (no letters on monitor) and pressed enter, and it said 'failed to authenticate'

How do I make the git push work in this case?

FWIW, I did a git commit on the local repo before attempting the above. Also, the in-IDE push feature is non existant. I don't see a 'publish local repo X to online repo Y' option.

like image 566
The Vivandiere Avatar asked Dec 15 '22 19:12

The Vivandiere


1 Answers

As @EdwardThomson said in the comments, you need to set up basic authentication on your account.

Go to your profile, select the credentials tab, and then click the enable alternate credentials link.

like image 188
Richard Banks Avatar answered Jan 31 '23 03:01

Richard Banks