简体   繁体   中英

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

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM