Error recreating new ssh key: gitconfig: Permission denied

Asked

Viewed 38 times

0

On the computer I work, there was another user. However I have to create a new ssh key and a new user.

But when I execute the commands:

$ git config --global user.name "alex Jose silva"

I get the message:

error: could not lock config file C:/Program Files (x86) /GNU/SSH/. gitconfig: Permission denied

I chose to delete the SSH folder from the computer because error persists

error: could not lock config file C:/Program Files (x86) /GNU/SSH/. gitconfig: No such file or directory

  • Tried to run with the terminal in administrator mode? The second error is because you deleted the files.

  • Yes...I get this message: Could not create directory '/c/Program Files (x86)/GNU/SSH/. ssh': No such file or directory

  • As I said earlier, this mistake is because you deleted the files. Restore the files and try the terminal/prompt in administrator mode. Or change the file directly.

  • No way to restore files...

  • I did a new git installation at zero

  • Already tried to reinstall the software for it to restore the files?

  • Yes. But without success

  • I have now chosen to generate the SSH key

  • and create new user

  • and when I run the command: $ git config --global user.name "alex.jose.silva"

  • I get this message: error: could not lock config file C:/Program Files (x86)/GNU/SSH/. gitconfig: No such file or directory

Show 6 more comments

1 answer

0


I could not fix the folder permission. I then chose to reinstall everything again:

Soon after everything started working again: Generate the key . ssh (it is necessary to create an SSH folder within GNU)and clone the repositories

Browser other questions tagged

You are not signed in. Login or sign up in order to post.