0

On our server we run a cronjob that checks our bitbucket git repository for the latest tag. When we run the command ourself it works just fine. For some reason when the cron executes the command it gives the following error:

ssh_exchange_identification: read: Connection reset by peer fatal: The remote end hung up unexpectedly

What could be the problem? I am running Ubuntu 10.04 (I know, it's old... Don't ask)

Bart Bergmans
  • 633
  • 1
  • 6
  • 9
  • Does your cron job and test run use the same user for SSH connection? – Tero Kilkanen Jul 28 '17 at 10:13
  • @TeroKilkanen yes – Bart Bergmans Jul 28 '17 at 10:54
  • Is there anything else in that output? "Connection reset by peer" indicates that the session was interrupted, but it doesn't say what interrupted the session or why. You can also get debug logging by adding `GIT_SSH_COMMAND="ssh -vvv"` to the beginning of the cron command. – Jim Redmond Jul 28 '17 at 17:29
  • Do you have any special environment settings in your shell that do not exist in cron that would affect how git tries to talk to the server? such as proxy settings or something? – J Earls Jul 30 '17 at 04:17

0 Answers0