Mercurial Repository Nightly Pull from a subdirectory on a server

一笑奈何 提交于 2019-12-08 08:32:28

问题


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?


回答1:


You said it yourself -- you need the RSA key authentication to work. So you'll need to debug why that isn't working. The easiest way would be to see the sshd logs on the server side. It'll probably be one of

  • Your key isn't on the server
  • The ~/.ssh directory or its contents' permissions on the server are wrong
  • The SSH daemon on the server doesn't allow passwordless access
  • It's not actually asking for a password at all; it's asking for a passphrase for your key


来源:https://stackoverflow.com/questions/4317964/mercurial-repository-nightly-pull-from-a-subdirectory-on-a-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!