Git via SSH returns Permission Denied in Windows

Troubleshooting guide in fixing the permission denied error when using Git via SSH in Windows.

Normally, this problem does not occur on either Mac or Ubuntu distros.

1. Solution

1.1 Set the GIT_SSH Environment Variable

In Windows, open up your Environment Variables panel and add the following entry:
GIT_SSH=C:\Windows\System32\OpenSSH\ssh.exe


1.2 Make sure that your private ssh key file is owned by the currently logged user and that it only has read access.





0 Comments

Post a Comment

Post a Comment (0)

Previous Post Next Post
NERV Open Source

Building production Spring Boot systems?

Explore NERV — open-source Java libraries for audit trails, persistence, exception handling, and reliable event-driven architecture.

Explore NERV on GitHub →