This article is the last of a series I’ve written about migrating from using PuTTy on Windows to using the native OpenSSH client now available on Windows 10: you can read the rest of the articles via:
- Storing keys using the SSH Agent
- Importing existing keys
- Creating a new public/private key pair
- Other useful OpenSSH commands
- Configuring Windows Git < You are here
If you are using Git for Windows and had previously been using PuTTy, you need to make a small tweak to the configuration for Git to use Windows 10’s OpenSSH client.
If you’ve been getting an error like:
FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey) fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
git clone, but a test such as
ssh email@example.com works, then you need to do the following steps.
- (Perhaps optional): Uninstall Git if you already have it installed. In theory, this can be done from Window’s “Add or Remove Programs”, but this was playing up for me. If you go into
C:\Program Files\Gitthere should be a
unins000.exeexecutable which will remove Git for you
- Install the latest version of Git (I actually uninstalled version 2.21.0.windows.1 and installed 2.23.0.windows.1) and during the setup, you’ll be prompt “Choosing the SSH executable”.
- Select “
Use (Tortoise)Plink“, but enter in the path to Window’s OpenSSH SSH client: “
- Open a fresh PowerShell window and cloning should work!
You might get a warning such as “warning: agent returned different signature type ssh-rsa (expected rsa-sha2-512)”, but that’s caused by a mismatch of keys and key types probably from the conversion from PuTTy keys. Generating a new public/private key pair and uploading that public key to Github/Bitbucket will fix that.
Be First to Comment