How to make git push to work with Cygwin?

After many searches and troubleshooting, I believe that I decided that Cygwin would not send its SSH private key when SSHing, unless you explicitly talk about it. I can do this in my SSH configuration file with the IdentityFile line, but I don't know how to do this when using git.

This time I'm specifically trying to click on GitHub. Added SSH key. Previously, I could not use SSH until I installed my configuration file and added the IdentityFile line. Now I can successfully SSH to GitHub but cannot git push.

Does anyone know how to get around this?

Thank you, ton!

Edit: To be clear, when I try to click git, I get the following error:

$ git push Permission denied (publickey). fatal: The remote end hung up unexpectedly 

But I can just SSH:

 $ ssh github Hi ______! You've successfully authenticated, but GitHub does not provide shell access. Connection to github.com closed. 

Edit2 with solution:

User 'Cupcake' suggested adding my key to ssh-agent. I ran:

 $ ssh-add <private key path> 

And now it works. Thanks!

+4
source share
1 answer

I personally use PuttyCyg for Putty directly in my Cygwin installation. This gives me the opportunity to access the Putty ssh implementation, as well as the Putty terminal, which, it seemed to me, is more easily configured and less buggy than Cygwin.

See the effective-cygwin GitHub page for a list of instructions for configuring PuttyCyg, as well as some notes and configuration files.

+1
source

Source: https://habr.com/ru/post/1497922/


All Articles