Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprected command: which #1914

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions book/04-git-server/sections/setting-up-server.asc
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ To do so, you must first add the full pathname of the `git-shell` command to `/e
[source,console]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo in the PR title and commit message, the word deprected should be deprecated. 😉

----
$ 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.
$ command -v git-shell # make sure git-shell is installed on your system.
$ sudo -e /etc/shells # and add the path to git-shell from last command
----

Now you can edit the shell for a user using `chsh <username> -s <shell>`:

[source,console]
----
$ sudo chsh git -s $(which git-shell)
$ sudo chsh git -s "$(command -v git-shell)"
----

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