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 [email protected]:v3/MyAzure/MyProject/MyRepo git push -u origin --all
I keep getting:
[email protected]'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 [email protected] ssh: connect to host mycompany.com port 22: Connection refused
I have done the following:
Am I missing the obvious? Is it better to use personal access token? Can anyone provide a walk through of the correct steps?
Open your security settings by browsing to the web portal and selecting your avatar in the upper right of the user interface. Select SSH public keys in the menu that appears. Select + New Key. Copy the contents of the public key (for example, id_rsa.
An SSH key is created as a resource and stored in Azure for later use. You can also create keys with the Azure CLI with the az sshkey create command, as described in Generate and store SSH keys.
This worked for me
adding a config file in ~/.ssh/
and adding these lines
Host ssh.dev.azure.com IdentityFile ~/.ssh/my_ssh_private_key IdentitiesOnly yes
This link by @wcoder helped
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With