{ "created": "2015-12-20T19:57:05Z", "hierarchy": [ { "name": "ROOT", "type": "folder", "uri": "/ROOT" }, { "name": "Installing Gitolite on CentOS 7", "type": "article", "uri": "Installing_Gitolite_on_CentOS_7" } ], "html": "\n\n \n \n \n \n \n \n \n \n \n \n \n Installing Gitolite on CentOS 7 – Nikhil's Personal Wiki\n \n \n \n \n \n
\n
\n \n
\n
\n \n \n\n

Installing Gitolite on CentOS 7\n \n

\n

You’ll use your public key to administer the gitolite server1. I
\nsaved mine in /tmp/nikhil.pub.

\n

Installation

\n
# Create a gitolite service account and switch to it\nuseradd git\nsu - git\n\n# Create a folder from where gitolite will run ($HOME/bin should be in $PATH)\nmkdir -p $HOME/bin\ngit clone https://github.com/sitaramc/gitolite.git /tmp/gitolite\n\n# Install the gitolite scripts\n/tmp/gitolite/install -to $HOME/bin\n\n# Set up gitolite with your key\ngitolite setup -pk /tmp/nikhil.pub\n\n# That's it! :)\n
\n

Administration

\n
# Clone the admin repository\ngit clone git@example.com:gitolite-admin\n\n# Edit the config file to add/edit repositories and permissions\nvim gitolite-admin/conf/gitolite.conf\n\n# Add/remove any keys in the key directory\ncp kathy.pub gitolite-admin/keydir/\n\n# Commit and push. Gitolite will set up remote.\ngit add .\ngit commit -m "Added blah repo"\ngit push\n
\n

If you see anything weird when cloning the Gitolite admin repository,
\nhose everything and start over:

\n
rm -rf ~/.gitolite* ~/bin/* ~/projects.list ~/repositories\n
\n

Miscellaneous

\n

If running SSH on a different port, an SSH config file is your friend.
\nHere’s a sample ~/.ssh/config

\n
Host gitserver\n    Hostname example.com\n    Port 3574\n    User git\n    # Don't need if using default id_rsa.pub\n    # IdentityFile ~/.ssh/my_key.pub\n
\n

Then clone with

\n
git clone gitserver:gitolite-admin\ngit clone gitserver:my-repository\n
\n

Footnotes

\n
\n
\n
    \n
  1. \n

    You can simply use ~/.ssh/id_rsa.pub in your home folder.
    \nGenerate with ssh-keygen -t rsa↩︎

    \n
  2. \n
\n
\n\n\n
\n \n
\n \n \n \n \n \n\n", "id": "0a309bba-bd3e-5997-9e47-bd913e718fbc", "modified": "2024-04-15T23:13:03Z", "revisions": [ { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2024-04-15T23:13:03Z", "id": "1f343266dce411121f0cff3ca7e3e0632be6ce97", "shortId": "1f343266", "subject": "Some more notes\n", "content": "You'll use *your* public key to administer the gitolite server[^1]. I\nsaved mine in `/tmp/nikhil.pub`.\n\nInstallation\n------------\n\n # Create a gitolite service account and switch to it\n useradd git\n su - git\n\n # Create a folder from where gitolite will run ($HOME/bin should be in $PATH)\n mkdir -p $HOME/bin\n git clone https://github.com/sitaramc/gitolite.git /tmp/gitolite\n\n # Install the gitolite scripts\n /tmp/gitolite/install -to $HOME/bin\n\n # Set up gitolite with your key\n gitolite setup -pk /tmp/nikhil.pub\n\n # That's it! :)\n\nAdministration\n--------------\n\n # Clone the admin repository\n git clone git@example.com:gitolite-admin\n\n # Edit the config file to add/edit repositories and permissions\n vim gitolite-admin/conf/gitolite.conf\n\n # Add/remove any keys in the key directory\n cp kathy.pub gitolite-admin/keydir/\n\n # Commit and push. Gitolite will set up remote.\n git add .\n git commit -m \"Added blah repo\"\n git push\n\nIf you see anything weird when cloning the Gitolite admin repository,\nhose everything and start over:\n\n rm -rf ~/.gitolite* ~/bin/* ~/projects.list ~/repositories\n\nMiscellaneous\n-------------\n\nIf running SSH on a different port, an SSH config file is your friend.\nHere's a sample `~/.ssh/config`\n\n Host gitserver\n Hostname example.com\n Port 3574\n User git\n # Don't need if using default id_rsa.pub\n # IdentityFile ~/.ssh/my_key.pub\n\nThen clone with\n\n git clone gitserver:gitolite-admin\n git clone gitserver:my-repository\n\nFootnotes\n---------\n\n[^1]: You can simply use `~/.ssh/id_rsa.pub` in your home folder.\n Generate with `ssh-keygen -t rsa`.\n" }, { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2015-12-27T07:27:56Z", "id": "5a5b1a32f41081d062ab86f8869a961bcad79668", "shortId": "5a5b1a32", "subject": "Fix Markdown conversion\n\nSaw half a season of The Office\n", "content": "You'll use *your* public key to administer the gitolite server[^1]. I\nsaved mine in `/tmp/nikhil.pub`.\n\nInstallation\n------------\n\n # Create a gitolite service account and switch to it\n useradd git\n su - git\n\n # Create a folder from where gitolite will run ($HOME/bin should be in $PATH)\n mkdir -p $HOME/bin\n git clone https://github.com/sitaramc/gitolite.git /tmp/gitolite\n\n # Install the gitolite scripts\n /tmp/gitolite/install -to $HOME/bin\n\n # Set up gitolite with your key\n gitolite setup -pk /tmp/nikhil.pub\n\n # That's it! :)\n\nAdministration\n--------------\n\n # Clone the admin repository\n git clone git@example.com:gitolite-admin\n\n # Edit the config file to add/edit repositories and permissions\n vim gitolite-admin/conf/gitolite.conf\n\n # Add/remove any keys in the key directory\n cp kathy.pub gitolite-admin/keydir/\n\n # Commit and push. Gitolite will set up remote.\n git add .\n git commit -m \"Added blah repo\"\n git push\n\nIf you see anything weird when cloning the Gitolite admin repository,\nhose everything and start over:\n\n rm -rf ~/.gitolite* ~/bin/* ~/projects.list ~/repositories\n\nMiscellaneous\n-------------\n\nIf running SSH on a different port, an SSH config file is your friend.\nHere's a sample `~/.ssh/config`\n\n Host gitserver\n Hostname example.com\n Port 3574\n User git\n # Don't need if using default id_rsa.pub\n # IdentityFile ~/.ssh/my_key.pub\n\nThen clone with\n\n git clone gitserver:gitolite-admin\n git clone gitserver:my-repository\n\nFootnotes\n---------\n\n[^1]: You can simply use `~/.ssh/id_rsa.pub` in your home folder.\n Generate with `ssh-keygen -t rsa`.\n" }, { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2015-12-21T02:30:47Z", "id": "3f2c54b1d767218fcb4855fbac306b015afaf551", "shortId": "3f2c54b1", "subject": "Incremental\n", "content": "You'll use *your* public key to administer the gitolite server[^1]. I\nsaved mine in `/tmp/nikhil.pub`.\n\nInstallation\n------------\n\n # Create a gitolite service account and switch to it\n useradd git\n su - git\n\n # Create a folder from where gitolite will run ($HOME/bin should be in $PATH)\n mkdir -p $HOME/bin\n git clone https://github.com/sitaramc/gitolite.git /tmp/gitolite\n\n # Install the gitolite scripts\n /tmp/gitolite/install -to $HOME/bin\n\n # Set up gitolite with your key\n gitolite setup -pk /tmp/nikhil.pub\n\n # That's it! :)\n\nAdministration\n--------------\n\n # Clone the admin repository\n git clone git@example.com:gitolite-admin\n\n # Edit the config file to add/edit repositories and permissions\n vim gitolite-admin/conf/gitolite.conf\n\n # Add/remove any keys in the key directory\n cp kathy.pub gitolite-admin/keydir/\n\n # Commit and push. Gitolite will set up remote.\n git add .\n git commit -m \"Added blah repo\"\n git push\n\nIf you see anything weird when cloning the Gitolite admin repository,\nhose everything and start over:\n\n rm -rf ~/.gitolite* ~/bin/* ~/projects.list ~/repositories\n\nMiscellaneous\n-------------\n\nIf running SSH on a different port, an SSH config file is your friend.\nHere's a sample `~/.ssh/config`\n\n Host gitserver\n Hostname example.com\n Port 3574\n User git\n # Don't need if using default id_rsa.pub\n # IdentityFile ~/.ssh/my_key.pub\n\nThen clone with\n\n git clone gitserver:gitolite-admin\n git clone gitserver:my-repository\n\nFootnotes\n---------\n\n\n\n\n\n[^1]: You can simply use `~/.ssh/id_rsa.pub` in your home folder.\n Generate with `ssh-keygen -t rsa`.\n" }, { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2015-12-20T19:57:05Z", "id": "742d6aed04e5e911ae54c71d903e209918cee275", "shortId": "742d6aed", "subject": "Installing Gitolite on CentOS 7 : v2", "content": "You'll use *your* public key to administer the gitolite server[^1]. I\nsaved mine in `/tmp/nikhil.pub`.\n\nInstallation\n------------\n\n # Create a gitolite service account and switch to it\n useradd git\n su - git\n\n # Create a folder from where gitolite will run ($HOME/bin should be in $PATH)\n mkdir -p $HOME/bin\n git clone https://github.com/sitaramc/gitolite.git /tmp/gitolite\n\n # Install the gitolite scripts\n /tmp/gitolite/install -to $HOME/bin\n\n # Set up gitolite with your key\n gitolite setup -pk /tmp/nikhil.pub\n\n # That's it! :)\n\nAdministration\n--------------\n\n # Clone the admin repository\n git clone git@example.com:gitolite-admin\n\n # Edit the config file to add/edit repositories and permissions\n vim gitolite-admin/conf/gitolite.conf\n\n # Add/remove any keys in the key directory\n cp kathy.pub gitolite-admin/keydir/\n\n # Commit and push. Gitolite will set up remote.\n git add .\n git commit -m \"Added blah repo\"\n git push\n\nIf you see anything weird when cloning the Gitolite admin repository,\nhose everything and start over:\n\n rm -rf ~/.gitolite* ~/bin/* ~/projects.list ~/repositories\n\nMiscellaneous\n-------------\n\nIf running SSH on a different port, an SSH config file is your friend.\nHere's a sample `~/.ssh/config`\n\n Host gitserver\n Hostname example.com\n Port 3574\n User git\n # Don't need if using default id_rsa.pub\n # IdentityFile ~/.ssh/my_key.pub\n\nThen clone with\n\n git clone gitserver:gitolite-admin\n git clone gitserver:my-repository\n\nFootnotes\n---------\n\n\n[Category: Nikhil's Notes](Category:_Nikhil's_Notes \"wikilink\")\n[Category: Installation Logs](Category:_Installation_Logs \"wikilink\")\n\n[^1]: You can simply use `~/.ssh/id_rsa.pub` in your home folder.\n Generate with `ssh-keygen -t rsa`.\n" }, { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2015-12-20T19:57:05Z", "id": "2cfa7fe15ed1b90014282c4c7440007812e3eac0", "shortId": "2cfa7fe1", "subject": "Installing Gitolite on CentOS 7 : First Draft", "content": "You'll use *your* public key to administer the gitolite server[^1]. I\nsaved mine in `/tmp/nikhil.pub`.\n\nInstallation\n------------\n\n # Create a gitolite service account and switch to it\n useradd git\n su - git\n\n # Create a folder from where gitolite will run ($HOME/bin should be in $PATH)\n mkdir -p $HOME/bin\n git clone https://github.com/sitaramc/gitolite.git /tmp/gitolite\n\n # Install the gitolite scripts\n /tmp/gitolite/install -to $HOME/bin\n\n # Set up gitolite with your key\n gitolite setup -pk /tmp/nikhil.pub\n\n # That's it! :)\n\nAdministration\n--------------\n\n # Clone the admin repository\n git clone git@example.com:gitolite-admin\n\n # Edit the config file to add/edit repositories and permissions\n vim gitolite-admin/conf/gitolite.conf\n\n # Add/remove any keys in the key directory\n cp kathy.pub gitolite-admin/keydir/\n\n # Commit and push. Gitolite will set up remote.\n git add .\n git commit -m \"Added blah repo\"\n git push\n\nIf you see anything weird when cloning the Gitolite admin repository,\nhose everything and start over:\n\n rm -rf ~/.gitolite* ~/bin/* ~/projects.list ~/repositories\n\nMiscellaneous\n-------------\n\nIf running SSH on a different port, SSH config files are your friend.\nHere's a sample `~/.ssh/config`\n\n Host gitserver\n Hostname example.com\n Port 3574\n User git\n # Don't need if using default id_rsa.pub\n # IdentityFile ~/.ssh/my_key.pub\n\nThen clone with\n\n git clone gitserver:gitolite-admin\n git clone gitserver:my-repository\n\nFootnotes\n---------\n\n\n[Category: Nikhil's Notes](Category:_Nikhil's_Notes \"wikilink\")\n[Category: Installation Logs](Category:_Installation_Logs \"wikilink\")\n\n[^1]: You can simply use `~/.ssh/id_rsa.pub` in your home folder.\n Generate with `ssh-keygen -t rsa`.\n" } ], "sizeInBytes": 1686, "source": "You'll use *your* public key to administer the gitolite server[^1]. I\nsaved mine in `/tmp/nikhil.pub`.\n\nInstallation\n------------\n\n # Create a gitolite service account and switch to it\n useradd git\n su - git\n\n # Create a folder from where gitolite will run ($HOME/bin should be in $PATH)\n mkdir -p $HOME/bin\n git clone https://github.com/sitaramc/gitolite.git /tmp/gitolite\n\n # Install the gitolite scripts\n /tmp/gitolite/install -to $HOME/bin\n\n # Set up gitolite with your key\n gitolite setup -pk /tmp/nikhil.pub\n\n # That's it! :)\n\nAdministration\n--------------\n\n # Clone the admin repository\n git clone git@example.com:gitolite-admin\n\n # Edit the config file to add/edit repositories and permissions\n vim gitolite-admin/conf/gitolite.conf\n\n # Add/remove any keys in the key directory\n cp kathy.pub gitolite-admin/keydir/\n\n # Commit and push. Gitolite will set up remote.\n git add .\n git commit -m \"Added blah repo\"\n git push\n\nIf you see anything weird when cloning the Gitolite admin repository,\nhose everything and start over:\n\n rm -rf ~/.gitolite* ~/bin/* ~/projects.list ~/repositories\n\nMiscellaneous\n-------------\n\nIf running SSH on a different port, an SSH config file is your friend.\nHere's a sample `~/.ssh/config`\n\n Host gitserver\n Hostname example.com\n Port 3574\n User git\n # Don't need if using default id_rsa.pub\n # IdentityFile ~/.ssh/my_key.pub\n\nThen clone with\n\n git clone gitserver:gitolite-admin\n git clone gitserver:my-repository\n\nFootnotes\n---------\n\n[^1]: You can simply use `~/.ssh/id_rsa.pub` in your home folder.\n Generate with `ssh-keygen -t rsa`.\n", "title": "Installing Gitolite on CentOS 7", "untracked": false, "uri": "/Installing_Gitolite_on_CentOS_7", "relativePath": "Installing Gitolite on CentOS 7.md" }