FreedomBox/doc/manual/en/GitWeb.raw.wiki
James Valleroy 92a022260b
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-22 20:32:24 -04:00

84 lines
3.8 KiB
Plaintext

#language en
##TAG:TRANSLATION-HEADER-START
~- [[de/FreedomBox/Manual/GitWeb|Deutsch]] - [[FreedomBox/Manual/GitWeb|English]] - [[es/FreedomBox/Manual/GitWeb|Español]] - [[hu/FreedomBox/Manual/GitWeb|Magyar]] - [[DebianWiki/EditorGuide#translation|(+)]] -~
##TAG:TRANSLATION-HEADER-END
<<TableOfContents()>>
## BEGIN_INCLUDE
== GitWeb (Simple Git Hosting) ==
||<tablestyle="float: right;"> {{attachment:Gitweb-icon_en_V01.png|Gitweb icon}} ||
'''Available since''': version 19.19
=== What is Git ===
Git is a distributed version-control system for tracking changes in source code during software development. !GitWeb provides a web interface to Git repositories. You can browse history and content of source code, use search to find relevant commits and code. You can also clone repositories and upload code changes with a command-line Git client or with multiple available graphical clients. And you can share your code with people around the world.
To learn more on how to use Git visit [[https://git-scm.com/docs/gittutorial|Git tutorial]].
=== Managing the repositories ===
After installation of !GitWeb, a new repository can be created. It can be marked as ''private'' to limit access.
=== Access ===
!GitWeb can be accessed after installation e.g. by the web client through {{{https://<my_freedombox_name>/gitweb}}}.
=== HTTP basic auth ===
!GitWeb on !FreedomBox currently supports HTTP(S) remotes only (i.e. not SSH). To avoid
having to enter the password each time you pull/push to the repository, you can
edit your remote to include the credentials.
''Example:'' https://username:password@my.freedombox.rocks/gitweb/myrepo
Your username and password will be encrypted. Someone monitoring the network traffic will notice the domain name only.<<BR>>
'''Note:''' If using this method, your password will be stored in plain text in the local repository's {{{.git/config}}} file. For this reason, you should create a !FreedomBox user who has only access to the gitweb and never use an admin account.
'''For GNOME users (Advanced)'''
GNOME "Passwords and Keys" utility can be used to store the username and password. See this [[https://stackoverflow.com/questions/36585496/error-when-using-git-credential-helper-with-gnome-keyring-as-sudo/40312117#40312117|StackOverflow Answer]] for details on how to do it.
=== Mirroring ===
Though your repositories are primarily hosted on your own !FreedomBox, you can
configure a repository on another Git hosting system like GitLab as a mirror.
=== Enabling/Disabling Features ===
In !FreedomBox, some of the default features of gitweb have been changed:
* Enabled: Blame feature to show what revision and author last modified each line of a file
* Enabled: Pickaxe feature to list the commits that introduced or removed a given string
* Enabled: Highlight feature to perform syntax highlighting on blobs
* Disabled: Snapshot feature that provides a download of a compressed tar file for a given revision (due to high resource usage).
These features can be changed on a per-repository bases by an administrator by editing the git configuration file for the repository on !FreedomBox. See manual page for gitweb.conf(5) for more details on syntax and features. For example, to re-enable the snapshot feature on `myrepo` repository, login to a !FreedomBox terminal via SSH or web console as administrator and edit the file `/var/lib/git/myrepo/config` to contain the following section:
{{{
[gitweb]
snapshot = tgz
}}}
=== External links ===
* Upstream project: https://git-scm.com/
* Upstream end user documentation: https://git-scm.com/docs/gitweb
* Debian community wikis: https://wiki.debian.org/CategoryGit
## END_INCLUDE
Back to [[FreedomBox/Features|Features introduction]] or [[FreedomBox/Manual|manual]] pages.
<<Include(FreedomBox/Portal)>>
----
CategoryFreedomBox