Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have setup my git server using Gitosis. I need to checkout the repository as different user on the same machine.

Suppose there are two machines:

  1. Linux based server (on which the repo is held under user name "GIT"; another user "Dev1" is one of the developers)
  2. Windows machine (user name "tech_geek")

How can I checkout the repo as "Dev1" to the Windows machine and also as "tech_geek"? So there will be two repositories checked out on the windows machine.

share|improve this question

1) Clone Gitosis admin repo:

$ git clone git@SERVER:gitosis-admin.git

2) Add Dev1's and tech_geek's SSH public keys to gitosis-admin/keydir (rename each public key as and Add to file gitosis-admin/gitosis.conf

[group developers]
members = dev1 tech_geek
[group new_project]
writable = new_project
members = @developers

where *new_project* is repo name (without .git suffix)
3) Commit and push

$ cd gitosis-admin
$ git add .
$ git commit -m "New devs and repo for new_project"
$ git push

4) Try to clone repo (as user Dev1 or tech_geek) from Windows hosts

$ git clone git@SERVER:new_project.git
share|improve this answer
done till this but the thing is how to determine that i am cloning as dev1 or tech_geek??? – Anuj Nov 16 '11 at 8:32
by user's private key (id_rsa or id_dsa) – drafael Nov 16 '11 at 12:29
Take a look this chapter Git server authentication using SSH public keys. – drafael Nov 16 '11 at 12:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.