Changes between Version 2 and Version 3 of Give users access to gitolite repos


Ignore:
Timestamp:
04/29/25 20:56:52 (4 weeks ago)
Author:
enno
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Give users access to gitolite repos

    v2 v3  
    1 soon
     11. 🗝️ Create a new SSH key pair
    22
     3ssh-keygen -t ed25519 -f ~/.ssh/KEYNAME
     4Example:
     5
     6ssh-keygen -t ed25519 -f ~/.ssh/mesechannel
     7✅ Creates:
     8
     9~/.ssh/mesechannel (private key)
     10~/.ssh/mesechannel.pub (public key)
     112. 🗝️ Add the new public key to Gitolite
     12
     13Clone the gitolite-admin repo if you haven't already:
     14
     15git clone kokyou.dev:gitolite-admin
     16(use your admin key).
     17
     18Then:
     19
     20cd gitolite-admin
     21cp ~/.ssh/mesechannel.pub keydir/mesechannel.pub
     22✅ You added the user key.
     23
     243. 🛠️ Edit conf/gitolite.conf
     25
     26Edit conf/gitolite.conf:
     27
     28@devs = mesechannel mesepackager
     29
     30repo airsituation
     31    RW+ = @devs
     32
     33repo gitolite-admin
     34    RW+ = admin mesechannel
     35✅ Both admin and mesechannel can now fully control Gitolite.
     36
     374. 📤 Admin Push Syntax (VERY IMPORTANT)
     38
     39Once you changed keydir/ and/or conf/, you must commit and push like this:
     40
     41git add keydir/
     42git add conf/gitolite.conf
     43git commit -m "Add mesechannel as dev and admin"
     44git push
     45In short:
     46
     47Always git add the modified files.
     48Always git commit.
     49Always git push to update Gitolite immediately.
     50✅ After push, Gitolite applies changes automatically — no restart needed.
     51
     525. 🔐 Edit local ~/.ssh/config
     53
     54Host kokyou.dev
     55    User git
     56    IdentityFile ~/.ssh/admin
     57    IdentitiesOnly yes
     58
     59Host gitolite-mesechannel
     60    HostName kokyou.dev
     61    User git
     62    IdentityFile ~/.ssh/mesechannel
     63    IdentitiesOnly yes
     64
     65Host gitolite-mesepackager
     66    HostName kokyou.dev
     67    User git
     68    IdentityFile ~/.ssh/mesepackager
     69    IdentitiesOnly yes
     70✅ SSH knows which key to use depending on which Host alias you reference.
     71
     726. 🚀 Push an existing local project to Gitolite
     73
     74From your project directory:
     75
     76cd ~/projects/myproject
     77git remote add origin gitolite-mesechannel:airsituation
     78git push -u origin main
     79✅ Your full project history is uploaded.
     80
     817. 📥 Clone a repo using different users/keys
     82
     83Example:
     84
     85git clone gitolite-mesechannel:airsituation
     86or
     87
     88git clone gitolite-mesepackager:some-other-repo
     89depending on which SSH identity you use.
    390[wiki:Workflows back]