Code Whisperer
Code Whisperer

Reputation: 23652

VSTS - SSH Not Working

I made a repo with VSTS and cloned it, and set up all the SSH credentials correctly, but it still asks me for my username and password every time. How come?

Upvotes: 2

Views: 146

Answers (1)

Code Whisperer
Code Whisperer

Reputation: 23652

The problem was I had the repository origin as an https url. It needs to be SSH.

git remote remove origin

git remote add origin ssh://<your-repo-location>

Or (shorter)

git remote set-url origin ssh://<your-repo-location>

(see git remote man page)

Upvotes: 2

Related Questions