Cygwin Tips: Difference between revisions

From EggeWiki
No edit summary
Line 11: Line 11:
I found this [[http://www.whitesquaresoft.com/2006/07/15/cvsrootccess-on-cvs-execution/ solution]]:
I found this [[http://www.whitesquaresoft.com/2006/07/15/cvsrootccess-on-cvs-execution/ solution]]:
<geshi lang="bash">
<geshi lang="bash">
find . -name Root -or -name Entries -or -name Repository | while read file; do dos2unix.exe $file”; done
find . -name Root -or -name Entries -or -name Repository | while read file; do dos2unix.exe "$file"; done
</geshi>
</geshi>



Revision as of 18:58, 16 September 2007

Cygwin CVS

I was getting this error.

<geshi lang="bash"> $ cvs up /CVSROOTccess /usr/local/cvsroot No such file or directory </geshi>

I found this [solution]: <geshi lang="bash"> find . -name Root -or -name Entries -or -name Repository | while read file; do dos2unix.exe "$file"; done </geshi>

Cygwin File Permissions

I kept getting this problem with Cygwin. I've never had this problem with non-domain accounts, or where my home directory is on my local hard drive:

<geshi lang="bash"> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0444 for '/cygdrive/z/.ssh/id_rsa' are too open. It is recommended that your private key files are NOT accessible by others. This private key will be ignored. bad permissions: ignore key: /cygdrive/z/.ssh/id_rsa </geshi>

I would try every combination of chmod and Windows permissions without any luck. <geshi lang="bash"> begge1@AA055369 ~ $ ll /cygdrive/z/.ssh/id_rsa -r--r--r-- 1 begge1 Domain Users 1675 Sep 12 10:07 /cygdrive/z/.ssh/id_rsa

begge1@AA055369 ~ $ chmod 400 /cygdrive/z/.ssh/id_rsa

begge1@AA055369 ~ $ ll /cygdrive/z/.ssh/id_rsa -r--r--r-- 1 begge1 Domain Users 1675 Sep 12 10:07 /cygdrive/z/.ssh/id_rsa </geshi>

Fortunately I found this solution:

Cygwin can emulate more Unix-like file permissions but it is not enabled by default. One has to add "ntea" to CYGWIN variable in the cygwin.bat file in the cygwin root directory, which tends to be C:\cygwin. For example I have:
set CYGWIN=tty ntea
in C:\cygwin\cygwin.bat
With this, "chmod 0600 .id_rsa" works as in Unix. ssh stopped complaining and I could ssh w/o entering a password. Happy ending.

Thanks to "Teruhiko Kurosaka" for this tip.

<geshi lang="bash"> begge1@AA055369 ~ $ ll .ssh/id_rsa total 34 -r--r--r-- 1 begge1 Domain Users 1675 Sep 12 10:07 id_rsa

begge1@AA055369 ~ $ chmod 400 .ssh/id_rsa

begge1@AA055369 ~ $ ll .ssh/id_rsa total 34 -r-------- 1 begge1 Domain Users 1675 Sep 12 10:07 id_rsa </geshi>

My addition tip is to putCYGWIN=tty ntea in your Windows environment variables so rxvt works just as well. IMHO rtxv should be the default exe for Cygwin, as it's much friendlier than the cmd.exe which Cygwin normally runs in.