篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown Git no Key相关的知识,希望对你有一定的参考价值。
```
ssh-add -k ~/.ssh/id_rsa
```
AddKeysToAgent yes
How to fix
I fixed this by entering the following commands:
```
$ ssh-agent bash
```
This creates a new bash process that allows you to add private keys. When adding a new private key you will be prompted for the passphrase once and only once.
nd then:
```
$ ssh-add /home/username/.ssh/id_rsa
Enter passphrase for /home/username/.ssh/id_rsa:
Identity added: /home/username/.ssh/id_rsa (/home/username/.ssh/id_rsa)
```
...where username is your username. You can do the same using $USER variable:
```
$ ssh-add /home/$USER/.ssh/id_rsa
```
Alternatively, just use ~ for your home directory.
```
$ ssh-add ~/.ssh/id_rsa
```
And the problem was fixed.