I connect to one linux machine with a standard user account and use sudo when it is necessary to perform something a little above my users station.
One of those things would be to perform a pull using git (sudo git pull).
I want to set up key based authentication between the machine I am in and the git repository so as to not need to put in a password each time.
I have been able to set up authentication between my standard account on the machine and the git repository but when I try and set it up as root it will not work (I perform the same tasks as I did for my normal account but using sudo each time)
I presumed that as sudo runs as root (sudo whoami returns 'root') generating keys and transferring them to the other machine as sudo should work the same as if I was logged in as root. Am I wrong in my assumption or are there issues with using key based authentication as the root user onto another machine?