We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(12)
可能根本就没有这样的指南。如果是这样,你可能不太幸运说服任何人写一个,因为这将是一项艰巨的工作。
我会推荐两件事之一。更简单的方法是盲目地遵循您的指南,这意味着忘记 msysgit。
更难的是建立一台 Linux 服务器 - 可能作为 Windows 下的访客使用 VirtualBox(免费)或 VMWare 或 Parallels(付费),然后按照 Google 引导您的多组说明中的一组进行操作。但您可能会发现这些说明是不够的 - 例如,它们通常假设您已经设置了 ssh 服务器,因此您必须从其他地方获取该信息。我已经这样做了两次,并且可以说,除非您已经是 Linux 大师,否则这将是一场斗争。
There may simply not be such a guide. If so, you may not have much luck convincing anybody to write one, because it would be a lot of work.
I would recommend either of two things. The easier one is to follow the guide you have slavishly, which means forgetting about msysgit.
The harder one is to put up a Linux server - perhaps as a guest under Windows using VirtualBox (free) or VMWare or Parallels (pay), and then follow one of the many sets of instructions Google will lead you to. But you will probably find those instructions are insufficient - they usually assume you've already set up an ssh server, for example, so you have to get that info elsewhere. I've done that twice, and can say that unless you're already something of a Linux guru, it will be a struggle.
我做了 Bob Murphy 建议的“困难” “ 选项。
我在工作时在 VMWare Server(免费)下安装了 Ubuntu,然后按照 本指南有关设置 Gitosis。我发现它比尝试在 Windows 下运行要容易得多。一旦设置完毕,您实际上不必碰它,因为 Gitosis 管理可以通过 Windows 推送 gitosis.conf 文件的更新版本来完成。我需要直接在服务器上完成的任何工作都是通过 PuTTY 完成的,因此我不必使用可怕的 VMWare Server 界面。
我最近在家里摆弄 VirtualBox,发现它比 VMWare Server 更好用/更容易使用,所以它可能值得一看。
I did what Bob Murphy suggested was the "hard" option.
I installed Ubuntu under VMWare Server (free) at work and then followed this guide on setting up Gitosis. I found it much easier than trying to get it going under Windows. Once it's set up you really don't have to touch it because Gitosis administration can be done from Windows by pushing updated versions of the gitosis.conf file. Any work I do need to do on the server directly is done via PuTTY so I don't have to use the horrible VMWare Server interface.
I've recently been messing around with VirtualBox at home and I've found it much nicer/easier to work with than VMWare Server, so it may be worth looking at that.
我只是想添加我在 Steve 和 timc 上面提到的 PATH 设置的经验:我在使用 shell 工具时遇到了权限问题(例如 >mv 和 cp)将 Git 的 shell 可执行文件放在路径的前面。
将它们附加在现有的 PATH 之后,这解决了我的问题。示例:
GITPATH='/cygdrive/c/Program Files (x86)/Git/bin'
GITCOREPATH='/cygdrive/c/Program Files (x86)/Git/libexec/git-core'
PATH=${PATH}:${GITPATH}:${GITCOREPATH}
我猜 CopSSH 与所有 msysgit 的 shell 可执行文件都不能很好地配合...
I just wanted to add my experiences with the PATH setup that Steve and timc mentions above: I got permission problems using shell tools (like mv and cp) having Git's shell executables first in the path.
Appending them after the existing PATH instead this solved my problems. Example:
GITPATH='/cygdrive/c/Program Files (x86)/Git/bin'
GITCOREPATH='/cygdrive/c/Program Files (x86)/Git/libexec/git-core'
PATH=${PATH}:${GITPATH}:${GITCOREPATH}
I guess CopSSH doesn't go along well with all of msysgit's shell executables...
我在许多项目中使用 GitWebAccess 已有半年了,事实证明它是我使用过的最好的工具已经尝试过。不过,似乎最近的源不受支持,因此 - 不要采用最新的二进制文件/源。目前它们已损坏:(
您可以从此版本构建或下载我从此处使用的已编译二进制文件。
I'm using GitWebAccess for many projects for half a year now, and it's proven to be the best of what I've tried. It seems, though, that lately sources are not supported, so - don't take latest binaries/sources. Currently they're broken :(
You can build from this version or download compiled binaries which I use from here.
我发现了这篇文章,并且刚刚在我的博客上发布了一些可能有帮助的内容。
请参阅设置Windows 上带有 copSSH 的 Msysgit 服务器。虽然很长,但我已经成功地在 Windows 7 Ultimate x64 上运行了。
I found this post and I have just posted something on my blog that might help.
See Setting up a Msysgit Server with copSSH on Windows. It's long, but I have successfully got this working on Windows 7 Ultimate x64.
Windows 版 Bonobo Git 服务器
从 Bonobo Git 服务器网页:
功能:
Brad Kingsley 有一个很好的 安装和配置 Bonobo Git Server 的教程。
GitStack
Git Stack 是另一种选择。以下是他们网站上的描述:
1基本版最多可供 2 位用户免费
Bonobo Git Server for Windows
From the Bonobo Git Server web page:
Features:
Brad Kingsley has a nice tutorial for installing and configuring Bonobo Git Server.
GitStack
Git Stack is another option. Here is a description from their web site:
1 the basic edition is free for up to 2 users
关于 Tim Davis 页面的参考 - 在 Windows 上使用 copSSH 设置 Msysgit 服务器 - 我用它来获得在 Windows 7 Home Premium 64 上运行的 Git 服务器。
下面是事后分析/更新除了他的指示之外,我还学到了一些东西。
正如蒂姆·戴维斯所说,这是一个艰难而令人沮丧的过程,至少对我来说是这样——我不太擅长这种整合,但我在这个过程中学到了很多东西。我希望我的痛苦将来能够惠及其他人,因为这是一个艰难的过程。
有一个步骤是复制所有Git
将可执行文件放入您的 CopSsh bin 中
目录。而不是复制文件
并找出哪些文件是
需要时,将 git bin 路径添加到您的
git 路径。我通过修改我的
.bashrc 和 CopSsh 配置文件。
以下是我添加到 .bashrc(在您的 CopSsh 和 Windows 主目录中)的内容:
<块引用>
gitpath='/cygdrive/c/Program Files (x86)/Git/bin'
gitcorepath='cygdrive/c/Program Files (x86)/Git/libexec/git-core'
路径=${gitpath}:${gitcorepath}:${PATH}
这是我添加到 bash 配置文件中的内容(在 CopSsh 等/配置文件中):
<块引用>
gitpath='/c/Program Files (x86)/Git/bin'
gitcorepath='cygdrive/c/Program Files (x86)/Git/libexec/git-core'
导出 PATH="/bin:$syspath:$gitpath:$gitcorepath:$winpath"
这里有一些重复 - 它对我有用,所以有人指出修改路径的正确位置。
较新的 msysgit 版本可能无法为您提供
选择 ssh 的屏幕
可执行文件,您可以在 Git 之间进行选择
ssh 和 PuTTY ssh。你必须
如果您使用 PuTTY,请手动设置 GIT_SSH。
我没有关注其中的一部分
说明并且正在安装
乌龟 - 我使用命令行
相反,因为这就是我喜欢的方式
学习 vcs,就像我学习 rcs 和 Subversion 一样
发现这对我有用。我有
克隆命令的问题
使用 ssh。我是这样做的:
使用 ssh 进行 Git 克隆 - 找不到存储库< /a>
这是我最头疼的地方。
CopSsh 安装目录是
/程序文件 (x86)/ICW.我得到了
远离这个,但如果我这样做
再说一遍,我会使用目录名称
没有空格。
这些其他来源帮助我解决了问题:
设置 Git 服务器的另一种方法
在 Windows 上:
http://code.google.com/p/tortoisegit/wiki/HOWTO_CentralServerWindowsXP
客户端:
http://toolmantim.com/thoughts/setting_up_a_new_remote_git_repository
Git 作为服务器的解释
(与Windows无关,但更多
深入查看而不是安装
步骤):
http://progit.org/book/ch4-0.html
加上 O'Reilly 的使用 Git 进行版本控制 - 远程存储库章节。
回想起来,如果我知道这会多么耗时,我可能会开始使用 Mercurial,因为我读到 Windows 上的安装更容易,但在我使用 Git 一段时间后,我会对此有一个看法,然后尝试 Mercurial 。
With regards to the reference to the Tim Davis page - Setting up a Msysgit Server with copSSH on Windows - I used this to get a Git server running on Windows 7 Home Premium 64.
Below is a postmortem/update of what I learned in addition to his instructions.
Like Tim Davis said, this was an arduous and frustrating process, at least for me - I'm not too good with integration of this sort, but I learned alot in the process. I hope my pain benefits someone else in the future, because this was an arduous process.
There is a step to copy all the Git
executables into your CopSsh bin
directory. Instead of copying files
and figuring out which files are
needed, add the git bin path to your
git path. I did so by modifying my
.bashrc and CopSsh profile.
Here's what I added to .bashrc (in your CopSsh and Windows home directory):
Here's what I added to the bash profile (in CopSsh etc/profile):
There is some duplication here - it works for me, so someone chime in which is the correct place to modify the path.
The newer msysgit versions might not give you
the screen to choose the ssh
executable where you choose between the Git
ssh and PuTTY ssh. You'll have to
set GIT_SSH manually if you use PuTTY.
I didn't follow one part of the
instructions and that was installing
Tortoise - I used the command line
instead as that's how I prefer to
learn a vcs like I did with rcs and Subversion and
found that to work for me. I had
problems with the clone command
using ssh. Here's how I did it:
Git clone using ssh - can't find repository
This is where I banged my head the most.
The CopSsh install directory was
/Program Files (x86)/ICW. I got
away with this, but if I were doing
it again, I'd use a directory name
with no spaces.
These other sources helped me figure things out:
Another way to setup a Git server
on Windows:
http://code.google.com/p/tortoisegit/wiki/HOWTO_CentralServerWindowsXP
The client side of things:
http://toolmantim.com/thoughts/setting_up_a_new_remote_git_repository
An explanation of Git as a server
(not related to Windows, but a more
in depth look than installation
steps):
http://progit.org/book/ch4-0.html
Plus O'Reilly's Version Control with Git - the Remote Repositories chapter.
In retrospect, if I had known how time consuming this would be, I might have started out with Mercurial as I read the install on Windows is easier, but I'll have an opinion on that after I work with Git awhile and then try Mercurial.
我不知道为什么没有人建议 http://gitblit.com。纯基于java的解决方案,允许HTTP协议并且非常容易设置。
I am not sure why anyone hasn't suggested http://gitblit.com. Pure java based solution, allow HTTP protocol and really easy to setup.
在遵循 Tim Davis 的指南和 Steve 的后续操作后,我做了以下操作:
服务器 PC
将以下内容添加到用户的 CopSSH/home/user/.bashrc 文件中:
打开 Git Bash 并在 PC 上的任何位置创建存储库:
客户端 PC
)允许我成功克隆和提交,但我无法推送到服务器上的裸存储库。我不断收到:
这让我找到 Rui 的跟踪和解决方案 用于在客户端 PC 的 %USERPROFILE% 路径 (C:\Users\UserName) 中创建或添加以下行到 .gitconfig。
我不确定为什么需要这样做......如果有人可以提供见解,这会很有帮助。
我的git版本是1.7.3.1.msysgit.0
After following Tim Davis' guide and Steve's follow-up, here is what I did:
Server PC
Add the following to the user's CopSSH/home/user/.bashrc file:
Open Git Bash and create a repository anywhere on your PC:
Client PC
This allowed me to successfully clone and commit, but I could not push to the bare repo on the server. I kept getting:
This led me to Rui's trace and solution which was to create or add the following lines to .gitconfig in your Client PC's %USERPROFILE% path (C:\Users\UserName).
I am not sure why this is needed...if anybody could provide insight, this would be helpful.
my git version is 1.7.3.1.msysgit.0
GitStack 应该可以满足您的目标。我有一个向导设置。
它对 2 位用户免费,并具有基于 Web 的用户界面。它基于 msysgit。
GitStack should meet your goal. I has a wizard setup.
It is free for 2 users and has a web based user interface. It is based on msysgit.
有一个很好的开源 Git 堆栈,称为 Git Blit。它可用于不同的平台和不同的软件包。您还可以轻松地将其部署到现有的 Tomcat 或任何其他 servlet 容器。查看点击几下即可在 Windows 上设置 git 服务器教程了解更多详细信息,它将带您了解更多信息10 分钟即可完成基本设置。
There is a nice open source Git stack called Git Blit. It is available for different platform and in different packages. You can also easily deploy it to your existing Tomcat or any other servlet container. Take a look at Setup git server on windows in few clicks tutorial for more details, it will take you around 10 minutes to get basic setup.
您不需要 SSH 来共享 git。如果您使用 LAN 或 VPN,则可以将 git 项目导出为共享文件夹,并将其安装到远程计算机上。然后使用“file://”URL 而不是“git@”URL 配置远程存储库。总共需要 30 秒。完毕!
You don't need SSH for sharing git. If you're on a LAN or VPN, you can export a git project as a shared folder, and mount it on a remote machine. Then configure the remote repo using "file://" URLs instead of "git@" URLs. Takes all of 30 seconds. Done!