Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adding ssh key to Git account

Tags:

git

ssh

I generate a new ssh key and I try to add in my Git account I follow the steps in this link

In the last phase when generating a new ssh key, I try to add the new ssh to the ssh-agent using this code

$ ssh-add ~/.ssh/id_rsa

I have an error like

$ ssh-add ~/ .ssh/id_rsa Error loading key "/c/Users/hp/": Is a directory .ssh/id_rsa: No such file or directory

Thanks in advance for your help

like image 452
Azra Avatar asked Sep 04 '26 08:09

Azra


1 Answers

You have a space in your command in the quote, which should not be there:

ssh-add ~/ .ssh/id_rsa

The path should be without a space:

ssh-add ~/.ssh/id_rsa
like image 119
Jakuje Avatar answered Sep 07 '26 03:09

Jakuje



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!