简体   繁体   中英

Permission denied while creating ssh key using ssh-keygen Git bash Windows 10 Enterprise

I am trying to create ssh key using git bash ssh-keygen. After setting file name and passphrases Saving key "sshKey" failed: Permission denied error appears.

$ ssh-keygen -t rsa -C "email@bla.com" -b 4096
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/user1/.ssh/id_rsa): sshKey
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Saving key "sshKey" failed: Permission denied

Any ideas how to solve this problem?

I solved this problem by creating.ssh directory in C:/Users/currentUser and then open Git Bash and set path to newly created folder. After that generate ssh key using ssh-keygen and there is no Permission denied error .

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