I am attempting to run a Windows batch script nightly to pull a fresh copy of data to my local hard drive from a Mercurial repository, overwriting any data I have locally. The server on which the repository is located has many repos, so is located in a sub-directory on the server. I have set up PuTTY to use an RSA key so when I log onto the server with PuTTY, I need only enter my username.
The batch script has a command:
hg pull ssh://myusername@mydomain.com/targetrepo/
...but this only opens a prompt for me to enter my password. Normally, this would be fine but because the pull will be executed from a batch script, I need the RSA key authentication to work.
How do I allow a batch script in a subdirectory on the server that contains a Mercurial repository to execute without requiring entry of a password?