Cygwin and gitolite 3. How to set it up on windows

2019-06-03 17:56发布

问题:

I was using this guide.

Cygwin installation was good and all went well.
Gitolite installation, however, is bad and i can't seem to find the solution to what should i do (neither google helps with that, because everybody link to the page i gave a link to, or everybody talk about old versions of gitolite.)

I have reached the step No. 5 of the "Installing Gitolite" part.
1. I did the part with gitolite cloning ok.
2. The part with installing gitolite was different, but seems to have gone well. gl-system-install didn't work, so i used gitolite/install -ln as was told by the instructions at this site.
3. This is where everything fails. gl-setup doesn't exist anymore, so i used gitolite setup -pk ~/myName.pub command. At this stage it first says Initialized empty Git repository in C:/cygwin64/home/git/repositories/gitolite-admin.git, right after that i get fatal: Could not switch to '/home/git': No such file or directory
It did create the file /home/git/.gitolite.rc and i did what the guide told next to do. However when i execute the command git clone git@gitserver:gitolite-admin.git after exiting server shell, i get the error
bash: git-upload-pack: command not found
fatal: could not read from remote repository.

The repository gitolite-admin.git does exist in /home/git/repositories

I would really like to know what am i doing wrong here. I'd like to be able to run git with authentication on windows machine.

回答1:

It is an old guide using Cygwin and gitolite V2.

Nowadays, simply use a regular DOS session with msysgit (no need for Cygwin anymore, as detailed here).
For the installation, follow the official current instructions:
(check that the environment variable HOME is defined: git-cmd.bat defines it for you)

git clone https://github.com/sitaramc/gitolite/
cd gitolite
gitolite/install -to C:/path/to/bin