「リポジトリへのpush/pull用ユーザの作成」の編集履歴(バックアップ)一覧はこちら
追加された行は緑色になります。
削除された行は赤色になります。
* ユーザ追加
$ sudo useradd -d /var/git/repos -m git
* パスワード設定
$ sudo passwd git
* 公開鍵・秘密鍵の作成と設定
$ sudo su git
$ cd
$ ssh-keygen
$ cat .ssh/id_rsa.pub > .ssh/authorized_keys
$ chmod 600 .ssh/authorized_keys
* リポジトリ作成
$ mkdir [リポジトリ名].git
$ cd [リポジトリ名].git
$ git --bare init --shared=true
* ログインシェルをgit-shellへ変更
** git-shellを/etc/shellsへ追加
sudoが使えるユーザで行う
$ sudo su
# echo "$(which git-shell)" >> /etc/shells
** git-shellをログインシェルに設定
gitユーザに戻って行う
$ chsh -s "$(which git-shell)"
* 参考
lib.nekobato.net - サーバー上のgit用アカウントを利用してレポジトリを管理する
-http://lib.nekobato.net/article/20131008
Git - サーバーのセットアップ
-http://git-scm.com/book/ja/Git-%E3%82%B5%E3%83%BC%E3%83%90%E3%83%BC-%E3%82%B5%E3%83%BC%E3%83%90%E3%83%BC%E3%81%AE%E3%82%BB%E3%83%83%E3%83%88%E3%82%A2%E3%83%83%E3%83%97
SSH鍵認証 ssh-keygenコマンドで認証用の鍵を作成する | シュシュ
-http://e-days.info/2011/05/ssh-keygen/
Gitリモートリポジトリ構築 CapmNetwork
-http://capm-network.com/?tag=Git%E3%83%AA%E3%83%A2%E3%83%BC%E3%83%88%E3%83%AA%E3%83%9D%E3%82%B8%E3%83%88%E3%83%AA%E6%A7%8B%E7%AF%89
* ユーザ追加
$ sudo useradd -d /var/git/repos -m git
* パスワード設定
$ sudo passwd git
* 公開鍵・秘密鍵の作成と設定
$ sudo su git
$ cd
$ ssh-keygen
$ cat .ssh/id_rsa.pub > .ssh/authorized_keys
$ chmod 600 .ssh/authorized_keys
* リポジトリ作成
$ mkdir [リポジトリ名].git
$ cd [リポジトリ名].git
$ git --bare init --shared=true
* ログインシェルをgit-shellへ変更
** git-shellを/etc/shellsへ追加
sudoが使えるユーザで行う
$ sudo su
# echo "$(which git-shell)" >> /etc/shells
** git-shellをログインシェルに設定
gitユーザに戻って行う
$ chsh -s "$(which git-shell)"
* 参考
lib.nekobato.net - サーバー上のgit用アカウントを利用してレポジトリを管理する
-http://lib.nekobato.net/article/20131008
Git - サーバーのセットアップ
-http://git-scm.com/book/ja/Git-%E3%82%B5%E3%83%BC%E3%83%90%E3%83%BC-%E3%82%B5%E3%83%BC%E3%83%90%E3%83%BC%E3%81%AE%E3%82%BB%E3%83%83%E3%83%88%E3%82%A2%E3%83%83%E3%83%97
SSH鍵認証 ssh-keygenコマンドで認証用の鍵を作成する | シュシュ
-http://e-days.info/2011/05/ssh-keygen/
Gitリモートリポジトリ構築 CapmNetwork
-http://capm-network.com/?tag=Git%E3%83%AA%E3%83%A2%E3%83%BC%E3%83%88%E3%83%AA%E3%83%9D%E3%82%B8%E3%83%88%E3%83%AA%E6%A7%8B%E7%AF%89