DEV Community

Cover image for Fix git to work with pageant keys
Julian
Julian

Posted on

3 1

Fix git to work with pageant keys

after an update my git clones failed with a permission denied.



λ git clone --no-checkout ssh://git@gitlab.com/your-user/your-project.git
Cloning into 'your-project'...
git@gitlab.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


Enter fullscreen mode Exit fullscreen mode

i am not sure if its because of having installed putty in Program Files which have a space in it but the solution for
me was to create an environement variable named GIT_SSH_COMMAND with the value "C:\Program Files\Putty\plink.exe"
(you need the double quotes " in the value!).

Alt Text

after this cloning works again.

side tip: i use Rapid Environment Editor to modify my environement variables.

links:

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

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 →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay