mirror of
https://github.com/tiyn/wiki.git
synced 2026-03-03 22:34:46 +01:00
linux/git: added credential storing and caching
This commit is contained in:
@@ -25,9 +25,23 @@ A distinction can be made between
|
|||||||
Web interfaces for git are quite useful for easily showing code to other people.
|
Web interfaces for git are quite useful for easily showing code to other people.
|
||||||
Additionally it is easy to collaborate together.
|
Additionally it is easy to collaborate together.
|
||||||
|
|
||||||
- [Gitea](gitea.md) is an open-source and selfhosted and can be dockerized.
|
- [Gitea](gitea.md) is an open-source and selfhosted git instance which can be dockerized.
|
||||||
- [GitHub](https://github.com) is the go to system for many people. Not
|
- [GitHub](https://github.com) is a popular git server.
|
||||||
selfhosted, owned by microsoft ([cli-tool](https://github.com/github/hub)).
|
It is not selfhosted and owned by microsoft ([cli-tool](https://github.com/github/hub)).
|
||||||
|
- [GitLab](https://gitlab.com) is a self-hostable git instance which also has a default version
|
||||||
|
available via their website.
|
||||||
|
|
||||||
|
#### Git Apps
|
||||||
|
|
||||||
|
Depending on the [specific server](#server-with-web-interface) used there are many different apps
|
||||||
|
that can be used.
|
||||||
|
|
||||||
|
- For [GitHub](https://github.com) there is app with the same name for
|
||||||
|
[Android](/wiki/android.md) devices and iOS devices.
|
||||||
|
- For [Gitea](/wiki/gitea.md) and Forgejo there is an app called [GitNex](https://gitnex.com) which
|
||||||
|
is available for [Android](/wiki/android.md) devices.
|
||||||
|
- For [GitLab](https://gitlab.com) there is an app called [LabNex](https://labnex.app) which is
|
||||||
|
available for [Android](/wiki/android.md) devices.
|
||||||
|
|
||||||
#### Server without graphical interface
|
#### Server without graphical interface
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ A more or less complete overview of the options was performed in an
|
|||||||
Most [package managers](/wiki/linux/package_manager.md) package it in the package `git-delta`.
|
Most [package managers](/wiki/linux/package_manager.md) package it in the package `git-delta`.
|
||||||
|
|
||||||
Afterwards it needs to be enabled.
|
Afterwards it needs to be enabled.
|
||||||
To do this globally add the following lines to the configuration file of git, which can be found in
|
To do this globally add the following lines to the configuration file of git, which can be found in
|
||||||
`~/.gitconfig`.
|
`~/.gitconfig`.
|
||||||
Depending on the system settings and preferences the dark-mode (`dark`) and the side-by-side view
|
Depending on the system settings and preferences the dark-mode (`dark`) and the side-by-side view
|
||||||
(`side-by-side`) can and should be disabled.
|
(`side-by-side`) can and should be disabled.
|
||||||
@@ -141,3 +141,20 @@ git config --global color.diff.old "red bold"
|
|||||||
git config --global color.diff.new "green bold"
|
git config --global color.diff.new "green bold"
|
||||||
git config --global color.diff.whitespace "red reverse"
|
git config --global color.diff.whitespace "red reverse"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Save HTTPS Credentials
|
||||||
|
|
||||||
|
The credentials used for HTTPS authorization can be saved with the following command.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git config --global credential.helper store
|
||||||
|
```
|
||||||
|
|
||||||
|
They can also be cached with the following command.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git config --global credential.helper cache
|
||||||
|
```
|
||||||
|
|
||||||
|
Both of these commands work globally.
|
||||||
|
For local storing or caching of credentials the commands have to be adapted.
|
||||||
|
|||||||
Reference in New Issue
Block a user