Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions book/04-git-server/sections/setting-up-server.asc
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,33 @@ To do so, you must first add `git-shell` to `/etc/shells` if it's not already th
`/etc/shells`에 `git-shell`를 추가한다. 아래를 보자.

[source,console]
//////////////////////////
----
$ cat /etc/shells # see if `git-shell` is already in there. If not...
$ which git-shell # make sure git-shell is installed on your system.
$ sudo vim /etc/shells # and add the path to git-shell from last command
----
//////////////////////////
----
$ cat /etc/shells # 만약 여기에 `git-shell`이 있으면 추가되어있는 것이다. 여기에 없으면..
$ which git-shell # git-shell이 설치돼있는지 확인하고,
$ sudo vim /etc/shells # 이 명령어를 실행해 마지막 줄에 git-shell의 경로를 추가한다.
----

//////////////////////////
Now you can edit the shell for a user using `chsh <username>`:
//////////////////////////
`chsh <계정 이름>`명령어를 이용해서 특정 계정의 쉘을 바꿀 수 있다.

[source,console]
//////////////////////////
----
$ sudo chsh git # and enter the path to git-shell, usually: /usr/bin/git-shell
----
//////////////////////////
----
$ sudo chsh git # git-shell 경로를 입력해준다. 보통 /usr/bin/git-shell 이다.
----

//////////////////////////
Now, the 'git' user can only use the SSH connection to push and pull Git repositories and can't shell onto the machine.
Expand Down