Saturday, July 30, 2022

[SOLVED] using the SSH key generated by ed25519 algorithm in git required password every time I pull or push

Issue

I found that when using the SSH key which generated by ed25519 algorithm in github, I am required to input the password every time when pull or push;

but if I use the SSH key generated by rsa algorithm, everything is ok, not need password or ohther thing.

and I try in github and gitlab, I got the same situation:

the SSH key generated by ed25519 algorithm: What the hell are you? fill the password or go away!

the SSH key generated by rsa algorithm: Hello and welcome, I know who you are.

I set the config file in .ssh directory like:

config 1

and run ssh -T [email protected], I got:

enter image description here

and I change the config file to:

config 2

run ssh -T [email protected] again, I got:

enter image description here

its really confused me.

by the way, the first key is ed25519, the second is rsa.


Solution

Are you on MacOS, linux or windows?

If on MacOS, you might need to add additional fields in your ~/.ssh/config

If so, add the try adding following lines below to save password in ssh-agent & os keychain.

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile /new/key/file


Answered By - Stephen Arsenault
Answer Checked By - Clifford M. (WPSolving Volunteer)