4

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.

The Vivandiere
  • 3,059
  • 3
  • 28
  • 50
  • Git doesn't echo your password when you type it, so that somebody can't look over your shoulder. Set up alternate credentials in Visual Studio Online, enter that username and password, and don't worry when you don't see it being printed as you type it. http://blogs.msdn.com/b/buckh/archive/2013/01/07/how-to-connect-to-tf-service-without-a-prompt-for-liveid-credentials.aspx – Edward Thomson Oct 07 '14 at 23:40
  • possible duplicate of [Unable to Authenticate with Git Bash to Visual Studio Online](http://stackoverflow.com/questions/21808341/unable-to-authenticate-with-git-bash-to-visual-studio-online) – Edward Thomson Oct 07 '14 at 23:40
  • @EdwardThomson, I repeatedly entered my password correctly. Either I am being incredibly stupid and entering the wrong password again and again or something is off. – The Vivandiere Oct 07 '14 at 23:42
  • 4
    You need to set up alternate credentials. – Edward Thomson Oct 07 '14 at 23:44

2 Answers2

10

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.

Richard Banks
  • 12,456
  • 3
  • 46
  • 62
2

Also in response to @flame-spotter's comment about there being no in-IDE push: there is, but perhaps not as obvious as it could be to get to.

In VS2013:

  1. Go to View > Team Explorer.
  2. Select your repo and click 'changes'. Commit any changes you wish then click 'sync'.
  3. You then get to an 'Unsynced Commits' panel from which you can push, pull, merge, resolve conflicts etc.

Aside from the slight annoyance getting there, it's extremely powerful.

thclark
  • 4,784
  • 3
  • 39
  • 65