How to correctly add git man pages to ubuntu

I was starting out with git and decided to have a look at help pages. Upon typing:

git help config

I receive the following error message:

man: can't resolve /usr/share/man/man1/git-config.1.gz: No such file or directory
No manual entry for git-config
See 'man 7 undocumented' for help when manual pages are not available.

the package was built from source so I realised that the man pages were separate. I downloaded corresponding man pages in tar.gz format and tried to extract them to:

/usr/share/man/

using this command:

sudo tar -xzf git-manpages-1.8.4.3.tar.gz -C /usr/share/man

unfortunately it changes the ownership from root to user 110493 and group 5000. The git help command now reads:

man: can't resolve /usr/share/man/man1/git-config.1.gz: Permission denied
No manual entry for git-config
See 'man 7 undocumented' for help when manual pages are not available.

What can I do to finally make it work? It shouldn't take one day to install a set of manual pages.

0

1 Answer

You need to gzip them and make sure that is readable by all:

sudo chown -R root:root /usr/share/man/man1/ /usr/share/man/man5/ /usr/share/man/man7/
sudo chmod -R a+r /usr/share/man/man1/ /usr/share/man/man5/ /usr/share/man/man7/

If you want to test the validity of the manpage you can use:

sudo mandb --test

It will inform you of any problem.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like