vagabond 2011-06-11
安装Cygwin
集成Cygwin和Windows Security
搭建SSH服务器
***Info:Generating/etc/ssh_host_rsa_key
***Info:Generating/etc/ssh_host_dsa_key
***Info:Generating/etc/ssh_host_ecdsa_key
***Info:Creatingdefault/etc/ssh_configfile
***Info:Creatingdefault/etc/sshd_configfile
***Info:PrivilegeseparationissettoyesbydefaultsinceOpenSSH3.3.
***Info:However,thisrequiresanon-privilegedaccountcalled'sshd'.
***Info:Formoreinfoonprivilegeseparationread/usr/share/doc/openssh/README.privsep.
*** Query: Should privilege separation be used? (yes/no)***Info:Administratorprivileges.Shouldthisscriptattempttocreatea
*** Query: new local account 'sshd'? (yes/no)***Info:AddedsshtoC:\WINDOWS\system32\driversc\services
***Warning:Thefollowingfunctionsrequireadministratorprivileges!
***Query:Doyouwanttoinstallsshdasaservice?
*** Query: (Say "no" if it is already installed as a service) (yes/no)***Info:account(alsoknownasSYSTEM).Tostarttheservicenow,call
***Info:`netstartsshd'or`cygrunsrv-Ssshd'.Otherwise,it
***Info:willstartautomaticallyafterthenextreboot.
*** Info: Host configuration finished. Have fun!允许SSH客户端访问
验证下SSH登录
Theauthenticityofhost'10.0.2.15(10.0.2.15)'can'tbeestablished.
ECDSAkeyfingerprintis5d:a6:81:98:43:fa:5a:f6:df:ba:18:b9:a0:76:87:f8.
Areyousureyouwanttocontinueconnecting(yes/no)?yes
Warning:Permanentlyadded'10.0.2.15'(ECDSA)tothelistofknownhosts.
[email protected]'spassword:
Couldnotchdirtohomedirectory/home/git:Nosuchfileordirectory
Copyingskeletonfiles.
Thesefilesarefortheuserstopersonalisetheircygwinexperience.
Theywillneverbeoverwrittennorautomaticallyupdated.
`./.bashrc'->`/home/git//.bashrc'
`./.bash_profile'->`/home/git//.bash_profile'
`./.inputrc'->`/home/git//.inputrc'
`./.profile'->`/home/git//.profile'
git@china-fe1bdcde5~
$创建SSH密钥, 并使能够通过SSH identity以git用户登录SSH服务器
Generatingpublic/privatersakeypair.
Enterfileinwhichtosavethekey(/home/Administrator/.ssh/id_rsa):
Enterpassphrase(emptyfornopassphrase):
Entersamepassphraseagain:
Youridentificationhasbeensavedin/home/Administrator/.ssh/id_rsa.
Yourpublickeyhasbeensavedin/home/Administrator/.ssh/id_rsa.pub.
Thekeyfingerprintis:
6a:02:9f:42:99:7c:fe:52:e7:a9:fe:1b:15:1e:70:31Administrator@china-fe1bdcde5
Thekey'srandomartimageis:
+--[RSA2048]----+
|.E.|
|o.|
|o|
|.o.o|
|*.So|
|.=.....|
|.=.oo..|
|..+o.|
|o+oo.|
+-----------------+[email protected]'spassword:
Nowtryloggingintothemachine,with"ssh'[email protected]'",andcheckin:
~/.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.安装Gitolite
$ENV{PATH}="/usr/local/bin:/bin:/usr/bin";
#PLEASEREADTHEDOCUMENTATIONBEFOREEDITINGORASKINGQUESTIONS
#(http://github.com/sitaramc/gitolite/blob/pu/doc/gitolite.rc.mkd)
#(orhttp://sitaramc.github.com/gitolite/doc/gitolite.rc.html)
#thisfileisinperlsyntax.However,youdoNOTneedtoknowperltoedit
# it; it should be fairly self-explanatory and easy to maintain$gitstatus
#Onbranchmaster
nothing to commit (working directory clean)到此整个git server已经安装结束,可以参考Gitolite文档来配置:添加user和repository