Skip to content

Instantly share code, notes, and snippets.

@quchie
Last active August 30, 2016 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quchie/cd97ca8790a37724009e5c71aa4d3c14 to your computer and use it in GitHub Desktop.
Save quchie/cd97ca8790a37724009e5c71aa4d3c14 to your computer and use it in GitHub Desktop.
Fix "Permission denied (publickey)" for windows

#How to setup SSH with online repository for WINDOWS only!

##Generate RSA Private key ssh-keygen -t rsa -C "your@email.com"

Generating public/private rsa key pair.
Enter file in which to save the key (//.ssh/id_rsa): C:\Users\[profile]\.ssh\id_rsa
Enter passphrase (empty for no passphrase): [Type password or leave it empty and press enter]

##Generate Public Key from Private key ssh-keygen -y -f C:\Users\[profile]\.ssh\id_rsa > C:\Users\[profile]\.ssh\id_rsa.pub

##Copy private and public key to the Git intallation folder Go to C:\Users\[profile]\.ssh\ and copy id_rsa & id_rsa.pub file paste to Git installation folder at C:\Program Files (x86)\Git\.ssh

##Copy public key to Github, Bitbucket, Gitlab SSH Key type %userprofile%\.ssh\id_rsa.pub | clip

##Test with your branch git fetch --all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment