when I make git clone with ssh from a user prompt it works properly.
git clone ssh://URL.com/soft.git soft_git
the ssh key id_rsa
and id_rsa.pub
are under /home/user/.ssh
my purpose is the execute git with sudo
but I got the following error
Cloning into '/home/user/git/soft'...
Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I create a folder /root/.ssh
and I copy the ssh keys into it but I got the same error
how to execute git with sudo properly.