<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Running cron on Cygwin</title>
	<atom:link href="http://linux.subogero.com/894/cron-on-cygwin/feed/" rel="self" type="application/rss+xml" />
	<link>http://linux.subogero.com/894/cron-on-cygwin/</link>
	<description>#!/bin/bash</description>
	<lastBuildDate>Sun, 28 Dec 2014 22:29:39 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: James Yuan</title>
		<link>http://linux.subogero.com/894/cron-on-cygwin/comment-page-1/#comment-3428</link>
		<dc:creator>James Yuan</dc:creator>
		<pubDate>Wed, 15 May 2013 02:33:51 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?p=894#comment-3428</guid>
		<description>I resolve it by
a) Add &quot;StrictHostKeyChecking no&quot; in /etc/ssh_config
b) Copy .ssh to / , that is the cron job reads /.ssh folder.</description>
		<content:encoded><![CDATA[<p>I resolve it by<br />
a) Add &#8220;StrictHostKeyChecking no&#8221; in /etc/ssh_config<br />
b) Copy .ssh to / , that is the cron job reads /.ssh folder.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Yuan</title>
		<link>http://linux.subogero.com/894/cron-on-cygwin/comment-page-1/#comment-3256</link>
		<dc:creator>James Yuan</dc:creator>
		<pubDate>Mon, 22 Apr 2013 01:30:17 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?p=894#comment-3256</guid>
		<description>Yes, the HOME is /root:
drwxr-xr-x+  1 SYSTEM     root            0 Apr 19 18:30 root

And its .ssh:
drw-------+ 1 SYSTEM root            0 Apr 17 14:32 .ssh

Also the /etc/passwd file:
SYSTEM:*:......:/root:/bin/bash</description>
		<content:encoded><![CDATA[<p>Yes, the HOME is /root:<br />
drwxr-xr-x+  1 SYSTEM     root            0 Apr 19 18:30 root</p>
<p>And its .ssh:<br />
drw&#8212;&#8212;-+ 1 SYSTEM root            0 Apr 17 14:32 .ssh</p>
<p>Also the /etc/passwd file:<br />
SYSTEM:*:&#8230;&#8230;:/root:/bin/bash</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: subogero</title>
		<link>http://linux.subogero.com/894/cron-on-cygwin/comment-page-1/#comment-3225</link>
		<dc:creator>subogero</dc:creator>
		<pubDate>Fri, 19 Apr 2013 05:53:10 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?p=894#comment-3225</guid>
		<description>If you don&#039;t use passphrases, you don&#039;t need ssh-agent at all.
You mentioned you&#039;re running this cron job in SYSTEM&#039;s name.
Does SYSTEM have a home directory and a .ssh folder in it?
It&#039;s necessary.</description>
		<content:encoded><![CDATA[<p>If you don&#8217;t use passphrases, you don&#8217;t need ssh-agent at all.<br />
You mentioned you&#8217;re running this cron job in SYSTEM&#8217;s name.<br />
Does SYSTEM have a home directory and a .ssh folder in it?<br />
It&#8217;s necessary.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Yuan</title>
		<link>http://linux.subogero.com/894/cron-on-cygwin/comment-page-1/#comment-3224</link>
		<dc:creator>James Yuan</dc:creator>
		<pubDate>Fri, 19 Apr 2013 03:52:09 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?p=894#comment-3224</guid>
		<description>Thanks.
Actually no paraphrase on my private keys. And use your script, it still fails in Cygwin.</description>
		<content:encoded><![CDATA[<p>Thanks.<br />
Actually no paraphrase on my private keys. And use your script, it still fails in Cygwin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: subogero</title>
		<link>http://linux.subogero.com/894/cron-on-cygwin/comment-page-1/#comment-3221</link>
		<dc:creator>subogero</dc:creator>
		<pubDate>Thu, 18 Apr 2013 18:23:45 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?p=894#comment-3221</guid>
		<description>I&#039;ve written another post about using ssh-agent:
http://linux.subogero.com/corporate-git/ssh/

ssh-agent basically stores the plain decrypted versions of encrypted passphrase-protected private keys in memory and sends in to ssh through the ssh-socket upon request. The goal is to avoid having to enter the passphrase upon every usage of ssh.
In order to achieve this, it&#039;s not enough to start ssh-agent. You also have to add you private key once to the agent by entering the passphrase. That&#039;s what the ssh-add command is for.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve written another post about using ssh-agent:<br />
<a href="http://linux.subogero.com/corporate-git/ssh/" rel="nofollow">http://linux.subogero.com/corporate-git/ssh/</a></p>
<p>ssh-agent basically stores the plain decrypted versions of encrypted passphrase-protected private keys in memory and sends in to ssh through the ssh-socket upon request. The goal is to avoid having to enter the passphrase upon every usage of ssh.<br />
In order to achieve this, it&#8217;s not enough to start ssh-agent. You also have to add you private key once to the agent by entering the passphrase. That&#8217;s what the ssh-add command is for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Yuan</title>
		<link>http://linux.subogero.com/894/cron-on-cygwin/comment-page-1/#comment-3219</link>
		<dc:creator>James Yuan</dc:creator>
		<pubDate>Thu, 18 Apr 2013 09:59:22 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?p=894#comment-3219</guid>
		<description>&lt;a href=&quot;#comment-3207&quot; rel=&quot;nofollow&quot;&gt;@subogero &lt;/a&gt; 

It still doesn&#039;t work after
  a) Open a Cygwin window (as a user) and run ssh-agent. It tells me
     SSH_AUTH_SOCK=/tmp/ssh-cklVtBKR3bJZ/agent.6500; export SSH_AUTH_SOCK;
     SSH_AGENT_PID=6980; export SSH_AGENT_PID;
     echo Agent pid 6980;

  2) Add the above environments into the cron script (as a SYSTEM), and a &quot;ssh-add&quot; command.

  3) It outputs after &#039;git pull origin master&#039;
     Host key verification failed.
     fatal: The remote end hung up unexpectedly

Also tried to add these two lines, same errors.

    /usr/bin/keychain $HOME/.ssh/id_rsa
    . ~/.keychain/`/bin/hostname`-sh

I am sure /root/.ssh/id_rsa.pub (SYSTEM $HOME is /root) is uploaded into the github.com.</description>
		<content:encoded><![CDATA[<p><a href="#comment-3207" rel="nofollow">@subogero </a> </p>
<p>It still doesn&#8217;t work after<br />
  a) Open a Cygwin window (as a user) and run ssh-agent. It tells me<br />
     SSH_AUTH_SOCK=/tmp/ssh-cklVtBKR3bJZ/agent.6500; export SSH_AUTH_SOCK;<br />
     SSH_AGENT_PID=6980; export SSH_AGENT_PID;<br />
     echo Agent pid 6980;</p>
<p>  2) Add the above environments into the cron script (as a SYSTEM), and a &#8220;ssh-add&#8221; command.</p>
<p>  3) It outputs after &#8216;git pull origin master&#8217;<br />
     Host key verification failed.<br />
     fatal: The remote end hung up unexpectedly</p>
<p>Also tried to add these two lines, same errors.</p>
<p>    /usr/bin/keychain $HOME/.ssh/id_rsa<br />
    . ~/.keychain/`/bin/hostname`-sh</p>
<p>I am sure /root/.ssh/id_rsa.pub (SYSTEM $HOME is /root) is uploaded into the github.com.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: subogero</title>
		<link>http://linux.subogero.com/894/cron-on-cygwin/comment-page-1/#comment-3207</link>
		<dc:creator>subogero</dc:creator>
		<pubDate>Wed, 17 Apr 2013 09:06:07 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?p=894#comment-3207</guid>
		<description>First test whether you are able to do git push/pull manually.
If so, it means that the connection/authentication works and you have a cron-specific problem.

cron jobs run in a limited environment, unlike your login shell.
If you&#039;re using ssh-agent, you have to set the SSH_AUTH_SOCK variable in the  crontab manually.
&lt;pre&gt;
SSH_AUTH_SOCK=/home/xxxxx/.ssh/.ssh-socket
* * * * * ssh foo@bar ls &gt; logfile 2&gt;&amp;1
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>First test whether you are able to do git push/pull manually.<br />
If so, it means that the connection/authentication works and you have a cron-specific problem.</p>
<p>cron jobs run in a limited environment, unlike your login shell.<br />
If you&#8217;re using ssh-agent, you have to set the SSH_AUTH_SOCK variable in the  crontab manually.</p>
<pre>
SSH_AUTH_SOCK=/home/xxxxx/.ssh/.ssh-socket
* * * * * ssh foo@bar ls > logfile 2>&#038;1
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Yuan</title>
		<link>http://linux.subogero.com/894/cron-on-cygwin/comment-page-1/#comment-3206</link>
		<dc:creator>James Yuan</dc:creator>
		<pubDate>Wed, 17 Apr 2013 08:14:34 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?p=894#comment-3206</guid>
		<description>Hi，

Thank you for guide on the cron in Cygwin. It works well for me.

Now I have another problem that cron a job (as SYSTEM for domain users) to git pull/push from github.com. But it is always failed because &quot;Host key verification failed. fatal: The remote end hung up unexpectedly&quot; even I have uploaded the ~/.ssh/id_rsa.pub to github.com.

Did you encounter this or any guide for me?

Thanks,
James.</description>
		<content:encoded><![CDATA[<p>Hi，</p>
<p>Thank you for guide on the cron in Cygwin. It works well for me.</p>
<p>Now I have another problem that cron a job (as SYSTEM for domain users) to git pull/push from github.com. But it is always failed because &#8220;Host key verification failed. fatal: The remote end hung up unexpectedly&#8221; even I have uploaded the ~/.ssh/id_rsa.pub to github.com.</p>
<p>Did you encounter this or any guide for me?</p>
<p>Thanks,<br />
James.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
