Skip to content

Instantly share code, notes, and snippets.

@tatuas
Created January 4, 2014 15:12
Show Gist options
  • Save tatuas/8256271 to your computer and use it in GitHub Desktop.
Save tatuas/8256271 to your computer and use it in GitHub Desktop.
gitプライベートレポジトリを作成(CentOS、Ubuntu共通)
[root]# adduser git
# usermod -a -G git sawai
# usermod -a -G git 開発者ユーザー
# chmod 770 /home/git
# su - git
[git]
$ vim .bashrc
umask 002を追加
$ mkdir hoge.git
リポジトリ名hogeとする
$ cd hoge.git
$ git --bare init
あとはクライアント側でgitレポジトリを作成。
$ git remote add origin ssh://sawai@remotehost/home/git/hoge.git
$ git push origin master
でOK。
開発者が増えるときは、グループに追加していけばよい。
# usermod -a -G git 開発者ユーザー
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment