Created
November 7, 2013 01:42
-
-
Save yuuichi-fujioka/7347527 to your computer and use it in GitHub Desktop.
This shell will deploy git-server with ssh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# install git | |
apt-get install git | |
# create user for operate git | |
GIT_HOME=/srv/gitrepos | |
GIT_SHELL=`which git-shell` | |
mkdir -p ${GIT_HOME} | |
adduser --home ${GIT_HOME} --shell ${GIT_SHELL} git | |
# create things for ssh | |
SSH_DIR=${GIT_HOME}/.ssh | |
mkdir -p ${SSH_DIR} | |
touch ${SSH_DIR}/authorized_keys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment