Skip to content

Instantly share code, notes, and snippets.

@edwinpgm
Created July 2, 2016 22:49
Show Gist options
  • Save edwinpgm/09e81a34d47229ea668f2436cddc9da4 to your computer and use it in GitHub Desktop.
Save edwinpgm/09e81a34d47229ea668f2436cddc9da4 to your computer and use it in GitHub Desktop.
Configure Gitolite
# Local
# Create key
$(local) ssh-keygen -t rsa -f yourkeylocal
$(local) ssh-add ~/.ssh/yourkeylocal
$(local) scp ~/.ssh/yourkeylocal.pub username@server:/tmp/yourkeylocal.pub
# Sever
$(server) sudo apt-get install git
$(server) sudo adduser --system --group --shell /bin/bash --disabled-password git
$(server) cp /tmp/yourkeylocal.pub /home/git/yourkeylocal.pub
# Install Gitolite
$(server) su - git
$(server) git clone git://github.com/sitaramc/gitolite
$(server) mkdir bin
$(server) gitolite/install -to /home/git/bin
$(server) /home/git/bin/gitolite setup -pk yourkeylocal.pub
# Change SSH Config
$(server) vim /etc/ssh/sshd_config
# No required password
PasswordAuthentication no
$(server) reload ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment