原文地址:http://code.google.com/p/tortoisegit/wiki/HOWTO_CentralServerWindowsXP
Introduction
This guide will show you how to set up a centralized Git repository, which offers an option similar to a conventional subversion work-flow, with a centralized server.
This is not a difficult process; it is only a long sequence of simple steps.
Software Requirements
Software requirements are the following:
The 32bit versions of the software packages are linked. If installing for x64 on theserver, substitute installation packages (and paths) appropriately. The x64 versions have not been tested on the server, and only the versions mentioned here have
been tested; ymmv.
On The Server
- Installmsysgit 1.7.0.2
- Choose plink,not OpenSSH
- Choose Git only on windows path (middle option)
- InstallCopSSH 3.0.3on the server machine
- Use default options during installation
- By default, CopSSH installs toC:\Program Files\ICW\
- Modify CopSSH configuration:
- On server, in Windows:
- Control Panel > User Accounts > Create new account
- Create an account for each user to whom you wish to allow SSH access.
- It is fine for these accounts to be "Limited", or non-Administrators.
- Activate these new user accounts in CopSSH:
- Start > Programs > Copssh > "Activate a user"
- Choose user account, leave other options as default (/bin/bash, etc.)
- Type a passphrase.You must remember this passphrase: it is associated with the private key of the user being activated.
- Finish.
- InC:\Program Files\ICW\home, there is a subfolder for each user account:
- Inside each subfolder, send the<user>.keyand<user>.key.pubfiles
to the user, along with the pass phrase selected in (5) FOR THAT USER. They will need this information.
- Make a git repository:
- Lets assume we want to serve 2 repos: one on C: drive and one on D: drive
- On C:C:\SeeDriveRepos\Repo1\.git
- On D:D:\DeeDriveRepos\Repo2\.git
- For each parent folder, e.g.C:\SeeDriveRepos:
- Right Click > Sharing and Security > Security > Users: "Modify" = Checked (note that "Write" becomes checked as well, which is fine)
- This is needed for when a remote client wants to Push.
- NOTE: It will be more likely that the central server will host a bare git repository. In this instance, thefoldername will be something like\SeeDriveRepos\Repo.git.
This does not change the subsequent discussion, except that the URL when specified from the client side must obviously match the folder name above, in terms ofRepo.git.
-
Potential Gotcha: If you access and commit into this repository locally, in other words, while logged into the server directly, and using file-based access from a clone of this repository on the same server, then the
HEADS file representing that branch will take on the security privileges of that user. In other words, doing this while logged in as Administrator will prevent all other non-admin users from modifying that HEADS file: they will be unable to make commits to
that branch. There are various workarounds for this, including changing the write permissions on the folder tree of that repository to be valid for all ssh-enabled users, or making all ssh-user accounts (the Windows accounts) administrators, and so on.
- On server, ensure that the Firewall has port 22 open. This will allow incoming SSH traffic. Any other port-blocking software or hardware should have the same port open.
- The ssh server won't be able to find the required Git EXEs yet.
- Start > CopSSH > Start a unix bash shell.On at least Windows 7, this action must be performed while logged in under an Administrator account.
- cd /Bin
- Create a symbolic link togit.exe,git-receive-pack.exe,git-upload-archive.exe,git-upload-pack.exe:
$ ln -s /cygdrive/c/Program\ Files\ \(x86\)/Git/bin/git.exe git.exe
$ ln -s /cygdrive/c/Program\ Files\ \(x86\)/Git/libexec/git-core/git-receive-pack.exe git-receive-pack.exe
$ ln -s /cygdrive/c/Program\ Files\ \(x86\)/Git/libexec/git-core/git-upload-archive.exe git-upload-archive.exe
$ ln -s /cygdrive/c/Program\ Files\ \(x86\)/Git/libexec/git-core/git-upload-pack.exe git-upload-pack.exe
On The Client
Requirements for client configuration
You must have been given:
- Aprivatekey file, e.g.<user>.key
- apass phrasefor the same private key
- a user name to use, e.g.<user>
- The name of a server, e.g.<server>
Configuration procedure
(NOTE: The path for program files below is for Windows XP x64, i.e.C:\Program Files (x86)\; For 32bit windows, just
useC:\Program Files.)
- Installmsysgit 1.7.0.2
- Choose plink
- Choose git only on windows path
- InstallTortoiseGit 1.4.4.0
- After installation, under Settings > Network > SSH:
SSH Client =C:\Program Files (x86)\TortoiseGit\bin\TortoiseGitPLink.exe
- Potential gotcha: if you only work with other windows developers, you should consider disabling the auto-line-endings adjustment, and select the option to leave line endings unchanged. Spurious diffs related to line-endings transformations
have beenobserved.
- RunC:\Program Files (x86)\TortoiseGit\bin\puttygen.exe:
- The keys generated in CopSSH areOpenSSHkeys, but we want to useputtykeys with TortoiseGit; here, we convert the private key to a putty type.
- Click button "Load" > Select file<user>.key
- Save the converted private key somewhere, e.g.<user>.ppk
- Close puttygen
- RunC:\Program Files (x86)\TortoiseGit\bin\Pageant.exe
-
Addthe newly created<user>.ppk
- Enter the pass phrase for the private key when asked
- NOTE: On every reboot,Pageant.exemust be started, and the key loaded, and the pass
phrase entered.
- Clone the repositories from the server. Let's start with the C drive repo:
- find a suitable location, and Right Click > Git Clone:
- URL =<user>@<server>:c:/SeeDriveRepos/Repo1
- IfPageant.exeis not running, and/or not correctly set up with the right key and passphrase,
then set "Load Putty Key" (yes) = (path to<user>.ppk). WithoutPageant.exe,
you will be asked for your passphrase on every action.
- click OK
- A dialog will come up, asking whether ssh host information should be saved (yes/no): choose yes.
- The repository should be successfully cloned.If this is not the case, make sure thatPageant.exeis
running, and has the correct.ppkkey loaded.
- Cloning the repository on the D: drive of the server:
- URL =<user>@<server>:d:/DeeDriveRepos/Repo2
- For repositories on the C: drive of the server, the following URL will also work:
- URL =ssh://<user>@<server>/SeeDriveRepos/Repo1
- This format cannot be used for repositories on other drives of the server.
分享到:
相关推荐
windows上搭建git服务器
3.启动copSSH,选择 开始->所有程序->copSSH->control panel 4.其他关于public keys的事情无需操作,后面还会讲到 2.
windows下git服务器的搭建 windows git copssh tortoisegit
一、 Windows2003下安装GIT服务器所需的软件 5 二、 Msysgit与copssh的安装 5 三、 程序配置 6 1. 服务端git支持配置 6 2. 服务端Copssh配置 6 3. 客户端git配置(配置成支持远程无密码登入) 8 四、 测试Git服务器 ...
搭建git copssh ,一步一步进行搭建,所用的是当前最新版本
copssh就是为了给windows安装个ssh服务,然后自己弄个git服务器试试,突然发现电脑里的copssh安装包不见了, 下载大家的,修改成免费的,怎么修改?
windows 下git服务器的搭建(密码登陆) windows git copssh tortoisegit
COPSSH是一个SSH服务器,可以远程管理电脑系统,收集远端资料。
这个文档主要介绍了在windows下怎么搭建git版本控制环境,使用了putty、msysgit、copssh,使得我们在windows环境下自如的进行版本控制
使用copSSH在WINDOWS(XP)上建立SSH服务器;使用生成的“公钥-私钥”对作为身份标识;在服务器上配置SHELL脚本环境;配置客户端,加载私钥。
可以在Winxp上架设git服务器的解决方案 一 方案1:copssh + msysgit 这是一个非常简单而且灵活的方式。如果不涉及开发者对项目访问权限的管理问题,这是一个最经济高效的解决方案,本文介绍的就是这种安装模式。 ...
Git以及copssh,用来在windows上搭建Git server 。
git搭建文档,可以搭建成功Windows+Git+TortoiseGit+COPSSH 安装图文教程
1. 用于在windows上搭建ssh服务器使用,我是用在windows搭建git服务器时使用的; 2. 用于资源的保存;
这是我搭建git服务器所需要通过ssh连接到git服务器的插件
Copssh(gti本地服务器),安装流程请看http://blog.csdn.net/liu198peng/article/details/78362563
Git-1.8.1.2-preview20130201+TortoiseGit_1.8.14.0_32bit.1436149283+Copssh_4.1.0_Installer
总结开发过程中使用到的部分工具:Copssh、Eclipse、Git、JDK、Linux、MySQL、SVN、TortoiseGit、Ubuntn、虚拟机Centos6安装文档,帮助开发人员学习安装过程,解决开发过程中出现的问题
此压缩包,包含了 TortoiseGit-1.8.11.0-32bit.msi、 Copssh_4.1.0_Installer、 Git-1.9.2-preview20140411.exe和Git-1.9.4-preview20140929.exe(皆可使用)