I am trying to push a git repo from PowerShell into an Azure DevOps repo, and I keep getting different auth errors when trying to push it.
I am hoping somebody can shed some light on what I check, and do a proper walkthrough.
E.g.,
git remote add origin git@ssh.dev.azure.com:v3/MyAzure/MyProject/MyRepo
git push -u origin --all
I keep getting:
git@ssh.dev.azure.com's password:
I've input all sorts of passwords, but it's still failing. Which password is it talking about?
Alternatively, I've also gotten:
Permission denied, please try again.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Verification:
$ ssh -T myemail@mycompany.com
ssh: connect to host mycompany.com port 22: Connection refused
I have done the following:
- Created a repo in Azure DevOps
- Created a SSH key using git-bash, as per Microsoft's documentation, copied and pasted without spaces into Azure DevOps security.
- Gone to my profile/security and added an SSH key (generated in git-bash)
Am I missing the obvious? Is it better to use personal access token? Can anyone provide a walk through of the correct steps?