Issue
I have gen a key with ssh-keygen
and added it to GitHub, but when I push to GitHub in idea, it needs input the SSH password to login.
href="https://i.stack.imgur.com/KGcHj.png" rel="nofollow noreferrer">
I want ask what the code is and why it needs me to input the password or whether there are solutions to solve this problem.
This problem has bothered me for a long time and thanks for you answer!
Solution
Check first if your private key is encrypted: the password to enter would then be the passphrase you used when ssh-keygen
the key.
If you are on Windows, as shown in issue IDEA-90356, make sure your User environment variables include a HOME
set to %USERPROFILE%
.
Check also that ssh -Tv [email protected]
works (meaning it ends with a welcome message: "Hi username! You've successfully authenticated...
")
The OP Neil confirms in the comments
This is because my computer lacks the ssh config file.
After I added the relevant configuration file in the ssh folder according to the online tutorial, I can now successfully push and pull.
Neil added the following ~/.ssh/config
#fileContent:
Host github.com
identityFile ~/.ssh/id_rsa #your private key file,need to be delete
Host github.com
Hostname ssh.github.com
Port 443
User git
Answered By - VonC Answer Checked By - Mildred Charles (WPSolving Admin)