Created
January 4, 2014 15:12
-
-
Save tatuas/8256271 to your computer and use it in GitHub Desktop.
gitプライベートレポジトリを作成(CentOS、Ubuntu共通)
This file contains 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
[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