Git sync failure when using SSH keys

Git sync failure when using SSH keys

avatar

Hi,

I'm attempting to use ssh keys instead of username/password credential with Azure devops. After generating the credential on PSU and entering it into the keys section in the cloud, I keep encountering this when trying to sync:


Hoping for a little insight on where to go for troubleshooting this further!

a2f704a6-5221-4f19-a03e-3618ea06e029.png

All Comments (1)

avatar
Hi,

I'm attempting to use ssh keys instead of username/password credential with Azure devops. After generating the credential on PSU and entering it into the keys section in the cloud, I keep encountering this when trying to sync:

a2f704a6-5221-4f19-a03e-3618ea06e029
Hoping for a little insight on where to go for troubleshooting this further!


@lloydmitchell

The first thing I would check is whether the Git settings are using the external Git client. In PowerShell Universal, SSH-key Git sync is an external git.exe path rather than LibGit2Sharp.

Please try this:

  1. Install Git for Windows on the PSU server if it is not already installed.
  2. In PSU, go to Settings -> Git and enable Use External Git Client.
  3. Use the Azure DevOps SSH clone URL, not the HTTPS URL. The Azure DevOps SSH URL should look like:

git@ssh.dev.azure.com:v3/<organization>/<project>/<repository>

  1. Go to Platform -> SSH Keys in PSU and make sure the generated key has a real non-empty name.
  2. Copy the PSU-generated public key and add it to your Azure DevOps user profile under SSH public keys.
  3. In Settings -> Git, select that SSH key in the SSH key dropdown.
  4. Click Synchronize Now.


If you are currently using the internal Git client, or if the Git username field is blank while using the non-external client, the Value cannot be null. (Parameter 'name') error can happen because the internal Git needs a non-empty Git identity name. That error does not necessarily mean Azure DevOps rejected the SSH key.

The relevant docs are the PSU Git page and Microsoft's Azure DevOps SSH key page:


If that still fails after switching to the external client, please send:

  • PSU version.
  • Whether Use External Git Client is enabled.
  • The URL shape, sanitized to hide organization/project/repo if needed, but preserving whether it is git@ssh.dev.azure.com:v3/... or https://....
  • The full Git sync log entry from systemLog.txt.
  • Whether the PSU service account has a %USERPROFILE%\.ssh folder on the server.



Thanks 👍

Ends in 2 days