DEV Community

Cover image for Use GIT with SSH on Windows
Raghavendra
Raghavendra

Posted on

1

Use GIT with SSH on Windows

To connect git remotes using ssh url is sometime tricky in windows machines. Try the following steps to use git with ssh on windows

  • Download and Install latest Putty Executables
  • Run Pageant and add private keys
    • run pageant. It will start minimized on the task bar.
    • Double-click the pageant icon the the task bar.
    • add the private keys, whose public part is uploaded to github/gitlab
    • Need to run the pageant and add keys after every restart

Use puttygen.exe to generate the ssh key-pair
Pageant does not accepts the openssh private key.
puttygen.exe can be used to convert the private key generated from ssh-keygen to PKCS format

  • set environment variable GIT_SSH=C:\Windows\plink.exe
  • To trust the remote host, run plink.exe -agent -v git@github.com one-time for each host

You are all set to clone a repo from github using ssh url. Example - git clone git@github.com:somod-dev/somod.git

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free β†’

DEV Launches and Announcements

🐯 πŸš€ Timescale is now TigerData: Building the Modern PostgreSQL for the Analytical and Agentic Era

TL;DR: Eight years ago, we launched Timescale to bring time-series to PostgreSQL. Our mission was simple: help developers building time-series applications.

Check out the challenge

DEV is bringing live events to the community. Dismiss if you're not interested. ❀️