While adding an ssh-key in gitlab using git bash, I am getting the error:
"Saving key 'keyname' failed: Permission Denied"
. What shall I do?
This is the input-
$ ssh-keygen -t rsa -C "name@email.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/UserName/.ssh/id_rsa): fileName
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Saving key "fileName" failed: Permission denied
PS- Following things I have already tried-
- Setting the environment variable
- I have used cmd for inserting the same command, but was getting the following error- "ssh-keygen is not recognized as an internal or external command, operable program or batch file"
- Changing the current directory to
C:\Program Files\Git\bin
This is the path that I have set (as suggested from another SO question)-
C:\Program Files\Git\bin\ssh-keygen.exe
This was the SO question that I referred. Thanks in advance.