If you are here, it’s because you’re lost or you have problems installing a git repository server on Windows. I really hope it’s for the second reason
.
I choose the wrote this blog even if I know there are a lot of blogs about this subject, because none of them worked for me. Before I came with this guide, I try to install Gitosis on 3 computers and 4 Virtualbox installation by follow tutorial that I found.
I’ll keep this blog as simple as possible. You won’t need to understand the steps that we will do (It won’t hurt, if you try). I’ll give you the steps to do it right the first time and do a second blog about troubleshooting : Git Repository Server Gitosis on Win7 : Troubleshooting.
You will start by downloading and installing/configuring your Windows computer and after that we will configure Gitosis. I’ll do a quick overview how to setup your client computer (could be on the same computer) to connect to your git repository on Windows. To keep it simple, I’ll call that computer your “server” or “git server”.
Downloading software needed
You will need to download these softwares on your server :
- Cygwin : Cygwin is a Linux-like environment for Windows : download from here
- Setuptools for cygwin : Allow us to install Python applications (Gitosys) easily : download from here or here and be sure to select the 2.5 version (.egg)
Before installing these softwares, we have to open Windows Firewall. If you have another firewall, be sure to apply the same change that we will do.
I found a really good guide how to do that, so I’ll give credit to the guy who wrote it. Just follow this guide, step by step, but at the end just change the port for 22 instead of 80 (you can change the description HTTP for SSHD). Go here
Cygwin’s installation
Launch setup.exe . You will have to add these applications. (Enter there name in the search box and select them)
python -> python 2.5.x (Don’t select versions over 2.5.x)

ssh -> openssh

git -> git , gitgui, git-completion

vim -> vim

When the installation is completed, run Cygwin with the Administrator rights. (Starts menu, Cygwin, Cygwin Bash (right click)

You must see this screen

Configuring Git Server
GOOD. The fun starts here. We have to properly setup the server in Cygwin before installing Gitosis. We will configure Python and setup a sshd server (Gitosis use ssh). In the next steps, you will see that I used a user named : “bob”, in your case it will be your Windows account.
Installing Setuptools
Go to the folder where you download the application. In my case I choose the default folder c:\Users\bob\Downloads
bob@bob-PC ~
$ cd ../../cygdrive/c/Users/bob/Downloads/
bob@bob-PC /cygdrive/c/Users/bob/Downloads
$
bob@bob-PC /cygdrive/c/Users/bob/Downloads
$ ./setuptools-0.6c11-py2.5.egg
The output will look like that :
$ ./setuptools-0.6c11-py2.5.egg
Processing setuptools-0.6c11-py2.5.egg
Copying setuptools-0.6c11-py2.5.egg to /usr/lib/python2.5/site-packages
Adding setuptools 0.6c11 to easy-install.pth file
Installing easy_install script to /usr/bin
Installing easy_install-2.5 script to /usr/bin
Installed /usr/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg
Processing dependencies for setuptools==0.6c11
Finished processing dependencies for setuptools==0.6c11
bob@bob-PC /cygdrive/c/Users/bob/Downloads
$
bob@bob-PC /cygdrive/c/Users/bob/Downloads
$ chmod +r /usr/lib/python2.5/ -R
bob@bob-PC /cygdrive/c/Users/bob/Downloads
$
Configuring SSHD
We need to create a ssh-rsa key for your user. If you enter a passphrase, be sure to remember it. I used the default options for my setup.
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/bob/.ssh/id_rsa):
Created directory '/home/bob/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/bob/.ssh/id_rsa.
Your public key has been saved in /home/bob/.ssh/id_rsa.pub.
The key fingerprint is:
cc:85:b2:99:ee:ca:41:eb:be:b7:d9:ee:1b:a6:46:20 bob@bob-PC
The key's randomart image is:
The key's randomart image is:
+--[ RSA 2048]----+
| o. .oo o=|
| + . .=*=o|
| o +.+=+|
| . = .. o|
| S . o . |
| E |
| |
| |
| |
+-----------------+
bob@bob-PC /cygdrive/c/Users/bob/Downloads
$ cd
bob@bob-PC ~
$ cd .ssh/
bob@bob-PC ~/.ssh
$ cat id_rsa.pub > authorized_keys
bob@bob-PC ~/.ssh
$
We need to copy our public key to a temporary folder, because we will need it later.
bob@bob-PC ~/.ssh
$ mkdir ../../../cygdrive/c/temp
bob@bob-PC ~/.ssh
$ cp id_rsa.pub ../../../cygdrive/c/temp/bob.pub
bob@bob-PC ~/.ssh
$
The last step in this section : Setup SSHD service.
You will have few questions to answer. I put the answer after each questions in the description below.
bob@bob-PC ~/.ssh
$ ssh-host-config
*** Info: Generating /etc/ssh_host_key
*** Info: Generating /etc/ssh_host_rsa_key
*** Info: Generating /etc/ssh_host_dsa_key
*** Info: Creating default /etc/ssh_config file
*** Info: Creating default /etc/sshd_config file
*** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
*** Info: However, this requires a non-privileged account called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/READ
ME.privsep.
*** Query: Should privilege separation be used? (yes/no) yes
*** Info: Note that creating a new user requires that the current account have
*** Info: Administrator privileges. Should this script attempt to create a
*** Query: new local account 'sshd'? (yes/no) yes
*** Info: Updating /etc/sshd_config file
*** Warning: The following functions require administrator privileges!
*** Query: Do you want to install sshd as a service?
*** Query: (Say "no" if it is already installed as a service) (yes/no) yes
*** Query: Enter the value of CYGWIN for the daemon: [] ntsec tty
*** Info: On Windows Server 2003, Windows Vista, and above, the
*** Info: SYSTEM account cannot setuid to other users -- a capability
*** Info: sshd requires. You need to have or to create a privileged
*** Info: account. This script will help you do so.
*** Info: You appear to be running Windows 2003 Server or later. On 2003
*** Info: and later systems, it's not possible to use the LocalSystem
*** Info: account for services that can change the user id without an
*** Info: explicit password (such as passwordless logins [e.g. public key
*** Info: authentication] via sshd).
*** Info: If you want to enable that functionality, it's required to create
*** Info: a new account with special privileges (unless a similar account
*** Info: already exists). This account is then used to run these special
*** Info: servers.
*** Info: Note that creating a new user requires that the current account
*** Info: have Administrator privileges itself.
*** Info: No privileged account could be found.
*** Info: This script plans to use 'cyg_server'.
*** Info: 'cyg_server' will only be used by registered services.
*** Query: Do you want to use a different name? (yes/no) no
*** Query: Create new privileged user account 'cyg_server'? (yes/no) yes
*** Info: Please enter a password for new user cyg_server. Please be sure
*** Info: that this password matches the password rules given on your system.
*** Info: Entering no password will exit the configuration.
*** Query: Please enter the password:
*** Query: Reenter:
*** Info: User 'cyg_server' has been created with password 'encore00'.
*** Info: If you change the password, please remember also to change the
*** Info: password for the installed services which use (or will soon use)
*** Info: the 'cyg_server' account.
*** Info: Also keep in mind that the user 'cyg_server' needs read permissions
*** Info: on all users' relevant files for the services running as 'cyg_server'.
*** Info: In particular, for the sshd server all users' .ssh/authorized_keys
*** Info: files must have appropriate permissions to allow public key
*** Info: authentication. (Re-)running ssh-user-config for each user will set
*** Info: these permissions corrently. [Similary restrictions apply, for
*** Info: instance, for .rhosts files if the rshd server is running, etc].
*** Info: The sshd service has been installed under the 'cyg_server'
*** Info: account. To start the service now, call `net start sshd' or
*** Info: `cygrunsrv -S sshd'. Otherwise, it will start automatically
*** Info: after the next reboot.
*** Info: Host configuration finished. Have fun!
bob@bob-PC ~/.ssh
$
Now we start the service.
bob@bob-PC ~/.ssh
$ net start sshd
The CYGWIN sshd service is starting.
The CYGWIN sshd service was started successfully.
bob@bob-PC ~/.ssh
$
Let’s test it. We will connect and exit. You must have something like describe below.
$ ssh localhost
The authenticity of host 'localhost (::1)' can't be established.
RSA key fingerprint is 16:38:f8:f2:f7:81:53:7c:cf:c3:03:c0:45:0d:7e:51.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
bob@bob-PC ~
$ exit
logout
Connection to localhost closed.
bob@bob-PC ~/.ssh
$
Oh ya, the first big part is completed. The next part is Gitosis installation.
Gitosis installation
Now we will download and install Gitosis.
bob@bob-PC ~/.ssh
$ cd
bob@bob-PC ~
$ mkdir sources && cd sources
bob@bob-PC ~/sources
$
bob@bob-PC ~/sources
$ git clone git://eagain.net/gitosis.git
Initialized empty Git repository in /home/bob/sources/gitosis/.git/
remote: Counting objects: 614, done.
remote: Compressing objects: 100% (183/183), done.
remote: Total 614 (delta 434), reused 594 (delta 422)
Receiving objects: 100% (614/614), 93.82 KiB, done.
Resolving deltas: 100% (434/434), done.
bob@bob-PC ~/sources
$ cd gitosis/
bob@bob-PC ~/sources/gitosis
$ python setup.py install
running install
running bdist_egg
running egg_info
creating gitosis.egg-info
writing requirements to gitosis.egg-info/requires.txt
....
Using /usr/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg
Finished processing dependencies for gitosis==0.2
bob@bob-PC ~/sources/gitosis
$
Gitosis is a service that will allow us to create multiple git repositories. There are other alternatives to Gitosis like MSysGit, but Gitosis is a more complete solution. You only need one unix account to handle your multiple git users with Gitosis, instead of having one account by user.
Let’s create that git user. I’ll create a user named “git” with a password “userspassword”. It will create a Windows user.
bob@bob-PC ~/sources/gitosis
$ net user git userspassword /add
The command completed successfully.
bob@bob-PC ~/sources/gitosis
$
We need the next line to add that new Windows’s user to Cygwin.
bob@bob-PC ~/sources/gitosis
$ mkpasswd -l -u git >> /etc/passwd
bob@bob-PC ~/sources/gitosis
$
We have to connect through ssh using this new user : git to continue Gitosis’s configuration
bob@bob-PC ~/sources/gitosis
$ ssh git@localhost
git@localhost's password:
Could not chdir to home directory /home/git: No such file or directory
Copying skeleton files.
These files are for the user to personalise their cygwin experience.
They will never be overwritten nor automatically updated.
`./.bashrc' -> `/home/git//.bashrc'
`./.bash_profile' -> `/home/git//.bash_profile'
`./.inputrc' -> `/home/git//.inputrc'
git@bob-PC ~
$
We have to setup git config for our user.
git@bob-PC ~
$ git config --global user.name "git User"
git@bob-PC ~
$ git config --global user.email you@ca.ca
git@bob-PC ~
$
We need to create a ssh-rsa key.
git@bob-PC ~
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/git/.ssh/id_rsa):
Created directory '/home/git/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/git/.ssh/id_rsa.
Your public key has been saved in /home/git/.ssh/id_rsa.pub.
The key fingerprint is:
06:c8:e8:ee:39:96:f7:b6:48:5f:df:4f:ac:82:d4:43 git@bob-PC
The key's randomart image is:
+--[ RSA 2048]----+
| |
| o . |
| . o . |
| . . E |
| . So |
| . .. o . |
| ... ... . o |
| .+o.o...... o |
| .oo.o+. ..o.. |
+-----------------+
git@bob-PC ~
$
git@bob-PC ~
$ cd .ssh/
git@bob-PC ~/.ssh
$ cat id_rsa.pub > authorized_keys
git@bob-PC ~/.ssh
$
Setup Gitosis
At this point, we have installed Cygwin, sshd, setup a new user : git and clone Gitosis repository. We need to setup Gitosis using git user.
git@bob-PC ~/.ssh
$ cd
git@bob-PC ~
$ gitosis-init < .ssh/id_rsa.pub
Initialized empty Git repository in /home/git/repositories/gitosis-admin.git/
Reinitialized existing Git repository in /home/git/repositories/gitosis-admin.git/
git@bob-PC ~
$
The next step is really important. I'll cover in a new blog what happen if you miss this step. For some reasons, gitosis-init doesn't set the right permissions on folders.
git@bob-PC ~
$ chmod 755 /home/git/repositories/gitosis-admin.git/hooks/ -R
git@bob-PC ~
$ chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
git@bob-PC ~
$
Setting git user's accounts
Because Gitosis use only one account (git), Gitosis need a way to handle permissions. There is a config file for this purpose named : "gitosis-conf" and a folder named "keydir". Each time you want to modify, add or update permissions or change repositories, you will have to make changes in the repository : gitosis-admin. That repository came with Gitosis and it's a git repository, so you have to clone that repository and push back the changes.
For this time only, you will have to specify the complete path where gitosis-admin is.
git clone localhost:/home/git/repositories/gitosis-admin.git
git@bob-PC ~
$ mkdir git_clone
git@bob-PC ~
$ cd git_clone/
git@bob-PC ~/git_clone
$ git clone localhost:/home/git/repositories/gitosis-admin.git
Initialized empty Git repository in /home/git/git_clone/gitosis-admin/.git/
The authenticity of host 'localhost (::1)' can't be established.
RSA key fingerprint is 71:3c:3c:96:c6:72:dd:23:3a:dd:3d:b9:3d:4b:08:29.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 5 (delta 0), reused 5 (delta 0)
Receiving objects: 100% (5/5), done.
git@bob-PC ~/git_clone
$
Let's add administrator permissions to our Windows user named bob. There are 3 steps for that.
- Step 1 : add the user's ssh-rsa public key into gitosis/keydir (file must be named .pub)
- Step 2 : add the user into the file gitosis.conf
- Step 3 : commit and push the changes
Step 1 : add ssh-rsa public key
Remember when I said that we will need our bob key. It's for this step.
git@bob-PC ~/git_clone
$ cd gitosis-admin/keydir
git@bob-PC ~/git_clone/gitosis-admin/keydir
$ cp /home/git/../../../cygdrive/c/temp/bob.pub .
git@bob-PC ~/git_clone/gitosis-admin/keydir
$ ls -la
total 2
drwxr-xr-x+ 1 git None 0 2010-09-05 18:15 .
drwxr-xr-x+ 1 git None 0 2010-09-05 18:14 ..
-rw-r--r-- 1 git None 392 2010-09-05 18:15 bob.pub
-rw-r--r-- 1 git None 392 2010-09-05 18:14 git@bob-PC.pub
git@bob-PC ~/git_clone/gitosis-admin/keydir
$ cd ..
git@bob-PC ~/git_clone/gitosis-admin
$
Step 2 : add user in gitosis.conf
git@bob-PC ~/git_clone/gitosis-admin
$ vim gitosis.conf
You will see that :
[gitosis]
[group gitosis-admin]
writable = gitosis-admin
members = git@bob-PC
That file was generated with gitosis-init command. We will add a line to show debug message when we do git commands. You can remove it later when you will be familiar with Gitosis, but right now it will be useful to debug problems. To add text with Vim, use the letter "i" , enter your text and "espace" to exit insert mode. To save the file, just press "espace" key and enter : wq . That will write and quit.
[gitosis]
loglevel = DEBUG
[group gitosis-admin]
writable = gitosis-admin
members = git@bob-PC
To add Administrator rights for a user, simply add his userid (must be the same as the file put in keydir without the .pub extension) in the section member in [group gitosis-admin].
[gitosis]
loglevel = DEBUG
[group gitosis-admin]
writable = gitosis-admin
members = git@bob-PC bob
Step 3 : commit and push
If you are new to git, I suggest that you read a git tutorial. To export your changes to Gitosis, you have to do these commands :
- git add .
- git commit -m 'message'
- git push
git@bob-PC ~/git_clone/gitosis-admin
$ git add .
git@bob-PC ~/git_clone/gitosis-admin
$ git commit -m 'add user bob'
[master 66cda63] add user bob
2 files changed, 6 insertions(+), 1 deletions(-)
create mode 100644 keydir/bob.pub
git@bob-PC ~/git_clone/gitosis-admin
$
git@bob-PC ~/git_clone/gitosis-admin
$ git push
Counting objects: 8, done.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 764 bytes, done.
Total 5 (delta 0), reused 0 (delta 0)
To localhost:/home/git/repositories/gitosis-admin.git
a1c7b83..66cda63 master -> master
git@bob-PC ~/git_clone/gitosis-admin
$
At this point our Windows user bob should have Administrator rights. You shouldn't have to use the user git to edit gitosis-admin anymore. To be sure that the config was updated in Gitosis, run this command :
git@bob-PC ~
$ cat .gitosis.conf
[gitosis]
loglevel = DEBUG
[group gitosis-admin]
writable = gitosis-admin
members = git@bob-PC bob
git@bob-PC ~
$
Create a new repository
The final test will be to push a new repository into Gitosis. To create a new repository, we need :
- clone gitosis-admin
- edit gitosis.conf
- push modifications
- create new repository
- push repository
With your Windows account (not git) you will do the steps.
git@bob-PC ~
$ exit
logout
Connection to localhost closed.
bob@bob-PC ~/sources/gitosis
$ cd
bob@bob-PC ~
$ git clone git@localhost:gitosis-admin.git
Initialized empty Git repository in /home/bob/gitosis-admin/.git/
DEBUG:gitosis.serve.main:Got command "git-upload-pack 'gitosis-admin.git'"
DEBUG:gitosis.access.haveAccess:Access check for 'bob' as 'writable' on 'gitosis
-admin.git'...
DEBUG:gitosis.access.haveAccess:Stripping .git suffix from 'gitosis-admin.git',
new value 'gitosis-admin'
DEBUG:gitosis.group.getMembership:found 'bob' in 'gitosis-admin'
DEBUG:gitosis.access.haveAccess:Access ok for 'bob' as 'writable' on 'gitosis-ad
min'
DEBUG:gitosis.access.haveAccess:Using prefix 'repositories' for 'gitosis-admin'
DEBUG:gitosis.serve.main:Serving git-upload-pack 'repositories/gitosis-admin.git
'
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 10 (delta 0), reused 5 (delta 0)
Receiving objects: 100% (10/10), done.
bob@bob-PC ~
$ git config --global user.name "Bob Ette"
bob@bob-PC ~
$ git config --global user.email bob.ette@ca.ca
bob@bob-PC ~
$
Create our first repository
Let create a new repository named "first_repo".
- Add a new block [group]
- Set repository name in property writable
- Give write permission to users
bob@bob-PC ~
$ cd gitosis-admin/
bob@bob-PC ~/gitosis-admin
$ vim gitosis.conf
[gitosis]
loglevel = DEBUG
[group gitosis-admin]
writable = gitosis-admin
members = git@bob-PC bob
[group first_repo]
writable = first_repo
members = bob
You have to push the changes to Gitosis repository.
bob@bob-PC ~/gitosis-admin
$ git add .
bob@bob-PC ~/gitosis-admin
$ git commit -m 'add repo first_repo'
[master ef13c03] add repo first_repo
1 files changed, 4 insertions(+), 0 deletions(-)
bob@bob-PC ~/gitosis-admin
$ git push
DEBUG:gitosis.serve.main:Got command "git-receive-pack 'gitosis-admin.git'"
DEBUG:gitosis.access.haveAccess:Access check for 'bob' as 'writable' on 'gitosis
-admin.git'...
DEBUG:gitosis.access.haveAccess:Stripping .git suffix from 'gitosis-admin.git',
new value 'gitosis-admin'
DEBUG:gitosis.group.getMembership:found 'bob' in 'gitosis-admin'
DEBUG:gitosis.access.haveAccess:Access ok for 'bob' as 'writable' on 'gitosis-ad
min'
DEBUG:gitosis.access.haveAccess:Using prefix 'repositories' for 'gitosis-admin'
DEBUG:gitosis.serve.main:Serving git-receive-pack 'repositories/gitosis-admin.gi
t'
Counting objects: 5, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 376 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: INFO:gitosis.run_hook:Running hook post-update
remote: DEBUG:gitosis.gitdaemon:Global default is 'deny'
remote: DEBUG:gitosis.gitdaemon:Walking '.', seeing ['gitosis-admin.git']
remote: DEBUG:gitosis.gitdaemon:Deny 'gitosis-admin'
remote: INFO:gitosis.run_hook:Done.
To git@localhost:gitosis-admin.git
66cda63..ef13c03 master -> master
bob@bob-PC ~/gitosis-admin
$
At this point Gitosis is ready to receive a new repository. We need to create a local git repository and push it in your server.
bob@bob-PC ~
$ mkdir first_repo
bob@bob-PC ~
$ cd first_repo/
bob@bob-PC ~/first_repo
$ git init
Initialized empty Git repository in /home/bob/first_repo/.git/
bob@bob-PC ~/first_repo
$ touch readme
bob@bob-PC ~/first_repo
$ git add .
bob@bob-PC ~/first_repo
$ git commit -m 'add readme'
[master (root-commit) 09d3a30] add readme
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 readme
bob@bob-PC ~/first_repo
$ git remote add origin git@localhost:first_repo.git
bob@bob-PC ~/first_repo
$ git push origin master
DEBUG:gitosis.serve.main:Got command "git-receive-pack 'first_repo.git'"
DEBUG:gitosis.access.haveAccess:Access check for 'bob' as 'writable' on 'first_r
epo.git'...
DEBUG:gitosis.access.haveAccess:Stripping .git suffix from 'first_repo.git', new
value 'first_repo'
DEBUG:gitosis.group.getMembership:found 'bob' in 'gitosis-admin'
DEBUG:gitosis.group.getMembership:found 'bob' in 'first_repo'
DEBUG:gitosis.access.haveAccess:Access ok for 'bob' as 'writable' on 'first_repo
'
DEBUG:gitosis.access.haveAccess:Using prefix 'repositories' for 'first_repo'
Initialized empty Git repository in /home/git/repositories/first_repo.git/
DEBUG:gitosis.gitdaemon:Global default is 'deny'
DEBUG:gitosis.gitdaemon:Walking '.', seeing ['first_repo.git', 'gitosis-admin.gi
t']
DEBUG:gitosis.gitdaemon:Deny 'first_repo'
DEBUG:gitosis.gitdaemon:Deny 'gitosis-admin'
DEBUG:gitosis.serve.main:Serving git-receive-pack 'repositories/first_repo.git'
Counting objects: 3, done.
Writing objects: 100% (3/3), 200 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@localhost:first_repo.git
* [new branch] master -> master
bob@bob-PC ~/first_repo
$
OH YA ! It's done ! We got our first repository created and added to Gitosis.
In this guide, the client and server are on the same computer. If you used this guide to setup your company repositories, there are few alternatives you could use to setup your clients. You can install cygwin or MSysGit or TortoiseGit. I prefer cygwin because all the tools are included in the same installation.
If you have problems, I suggest to read again this blog, or read this Git Repository Server Gitosis on Win7 : Troubleshooting. about git toubleshooting.
You can follow me on Twitter
Pingback: Sebastien Dionne» Git Repository Server Gitosis on Win7 : Troubleshooting
Hi, I was just wondering what the reason is behind selected python 2.5? I’ve follow this and a few other tutorials and have my cygwin+gitosis server working wonderfully, but using 2.6. Is there some nasty issue that’s going to bite me in the butt?
Cheers,
Dave
Good to know that it’s possible to make it works on Python 2.6. I wasn’t able to make it works with 2.6. I describe the error message that I got in my next blog : Git troubleshooting. It could be just a problem with another application in Cygwin.
I will not use python for something else that Gitosis, so I don’t think I’ll try to find out what caused the problem. I’m pretty happy with the current setup
next step will be to add web (read-only) support.
Pingback: Sebastien Dionne» Gitosis on Cygwin : Tips and Tweaks
Up and running thanks to your wonderful tutorial. Installed in on Server 2008 and all worked like a charm.
thanks for the feedback.
A tiny note: I think the command…
git@bob-PC ~/.ssh
$ cat id_rsa.pub > authorized_keys
…at the end of the “Gitosis installation” section, causes trouble. Gitosis autogenerates the authorized_keys file everytime a key is added. When I deleted the entry that I added with cat (just before “###autogenerated by gitosis…”), things worked fine.
I know that Gistosis regenerates the file each time you push a new key. Maybe I forgot to describe a step.
Thanks Man, you have done a great job, every minute detail is covered.
One thing I would like to add, the windows user performing all the activities must have a password. Otherwise it gives a error Permission denied.
Thanks. I didn’t know that.
Good work man !
I followed some tutorial but this one finally work on my server.
Just one question,
To clone a directory on my own laptop what am I suppose to do?
Is that correct :
git clone ssh:git@my.ip.add.res/first_repo
or maybe git clone ssh:bob@my.ip.add.res/first_repo
(let’s suppose my user is bob and I create first_repo)
Okay I go through the problem and still doesn’t understand.
I download cygwin on my own laptop, install all and create the key.
I put the key in home/git/git_clone/gitosis_admin/keydir as jean.pub and add jean in the first_repo’s members but still not working.
I think I don’t make the good move and I am not that good with that kind of staff.
Thx if you can get me any help.@Xavier
Je ne suis pas sur de comprend ton problème. As-tu réussi à faire l’installation ou pas ? Pour cloner tu devrais faire :
git clone git@server:repo.git
exemple : git clone git://github.com/Atmosphere/atmosphere.git et ca va downloader Atmosphere dans ton répertoire local.
Je pense que rendu à ce point, c’est plus une compréhension de git qui te manque. Je pense que j’avais bien expliqué comment ajouter une clé et faire le commit et le clone après. Si tu n’y arrives toujours pas, contacte moi par email.
this worked flawessly after trying 3-4 other guides yours did the job, thanks alot!
Just wanted to say thanks for the tutorial, worked for me.
thanks for sharing.
i just started git.
this article has helped me a lot.