ssh -T git@gtihub.com command does not show passphrase on my Ubuntu20.04

Viewed 44

On Ubuntu 20.04, I tried cloning GitHub repository.(git clone (ssh url))

git clone git@github.com:scikit-learn/scikit-learn.git

But "git clone" command does not work. When I git clone repository (ssh), terminal does not ask passphrase of ssh.

I thought that ssh does not work on my PC, so I tried ssh -T git@github.com. It did not work.

When I tried ssh git@github.com, terminal did not ask passphrase, but it did work.

What is the problem with my git and ssh?

1 Answers

If you are using a private key protected by a passphrase, then, as described here, make sure it is added to the agent first:

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa

Then you can test it with ssh -T git@github.com, provided you have registered the public key forst to your GitHub account SSH section.

Related