We are still struggling somewhat with Git for multiple developers development of the Smartphone Brainscanner code. It may well be a RTFM-problem. We presumably have the Github Smartphone Brain Scanner code setup.
However, we also have a private department git accounts working with gitolite which brings some problems.
If you got multiple computers each with a different public key then you need extra tricks to be able to clone, push and pull from all computers. Here are the steps that got me working:
- I send one of my public keys to our department system administrators who then sets up an account with there specially developed script.
- With the account setup I can clone my gitolite-admin repository.
git clone <git username>@<department git server>:gitolite-admin.
- The keydir at
gitolite-admin/keydir/<git username>.pubis supposed to contain my public key from one of the computers. In a subdirectory I can put my public key from another computer, e.g.,
cp id_rsa.pub gitolite-admin/keydir/<name of other computer>/<git username>.pub
- Followed by the git commands git add, git commit and git push.
- Specify in the
~/.ssh/configthe username of the git server. Under
Host <department git server>put
User <git username>.
To have other users access the repository I create I have tried:
gitolite-admin/conf/gitolite.confadded the a line such as
@sbs2 = <my git username> <another user's git username> <a third user>and then under
repo sbs2-Brain3DI added
RW+ = @sbs2.
One user has reported that it now allows him to read and write in the repository, while cloning still is a problem for another user…
(originally published on Tumblr two months ago: Git: multiuser and multiple accounts)