Skip to content

Instantly share code, notes, and snippets.

@rbialek
Created June 7, 2011 13:32
Show Gist options
  • Save rbialek/1012262 to your computer and use it in GitHub Desktop.
Save rbialek/1012262 to your computer and use it in GitHub Desktop.
ssh/.config
Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile /home/user/.ssh/id_rsa
@wsdookadr
Copy link

wsdookadr commented Mar 30, 2023

@cefect
Maybe check if you have an SSH agent working and running.
Also check if your ssh key is loaded in the agent ssh-add -L

@LarsPeterson
Copy link

@cefect Check if you have added a SSH key on GitHub website under your profile. https://github.com/settings/keys. If so, make sure you are using the SSH URL when making the connection to origin. Should be [email protected] instead of https://github.com

image

@cefect
Copy link

cefect commented Mar 31, 2023

Thanks @wsdookadr, keys are added:
image\

Thanks @LarsPeterson,
key added to profile:
image
not sure what you mean by 'using the SSH URL when making the connection to origin', maybe this?
image

note I'm only trying to get rid of the key passphrase prompt (the ssh keys are working in that I don't have to enter username and password each time... just passphrase)

@LarsPeterson
Copy link

LarsPeterson commented Mar 31, 2023

@cefect

Oh whoops just read your comment again. You need to generate a new key and skip the passphrase part. Just don't enter anything. Then go through the whole process again, add to profile, etc.

@gpalazzo
Copy link

thanks for that!

@XedinUnknown
Copy link

This sort of configuration appears to be required if you want to use PHPStorm to clone from VCS via WSL.

@chrisliu1995
Copy link

chrisliu1995 commented Nov 22, 2023

 ssh-add {rsa_file} 

It works.

@ilya-shmel
Copy link

@rohitchormale, you're genius!!!

@bluka1
Copy link

bluka1 commented Mar 15, 2024

@rohitchormale thank you!

@SantiagoCaprile
Copy link

@rohitchormale thanks!

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