Skip to content

Commit ca5cd1d

Browse files
committed
🔑 Add documentation for Git credential caching
1 parent 8355f85 commit ca5cd1d

File tree

8 files changed

+66
-37
lines changed

8 files changed

+66
-37
lines changed

‎.vitepress/_sidebar.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ export default [
3737
},
3838
{
3939
text: 'Tools — Overview',
40-
link: '/tools',
4140
items: [
41+
{ text: 'Overview', link: '/tools/overview' },
4242
{ text: 'ansible', link: '/tools/ansible' },
4343
{ text: 'apt', link: '/tools/apt' },
4444
{ text: 'docker', link: '/tools/docker' },

‎.vitepress/theme/components/Home.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
seamless start of your coding tasks.
3131
</p>
3232

33-
<a href="/tools/">More →</a>
33+
<a href="/tools/overview">More →</a>
3434

3535
<h3>Languages</h3>
3636

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<template>
2-
<img alt="GitHub stars"
3-
src="https://img.shields.io/github/stars/kloudkit?style=for-the-badge&logo=github&logoColor=c6d0f5&labelColor=414559&color=yellow&link=https%3A%2F%2Fgithub.com%2Fkloudkit%2Fws-meta">
2+
<a alt="GitHub repository" href="https://github.com/kloudkit/ws-meta">
3+
<img style="margin-left: 15px"
4+
alt="Stars Badge"
5+
src="https://img.shields.io/github/stars/kloudkit?style=for-the-badge&logo=github&logoColor=c6d0f5&labelColor=414559&color=yellow">
6+
</a>
47
</template>

‎README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
---
1010

11+
```sh
12+
# TL-DR; âš¡ Power your batteries now!
13+
docker run -p 8080:8080 ghcr.io/kloudkit/workspace:latest
14+
```
15+
1116
## Documentation
1217

1318
The full guide *(including advanced usage and API reference)* is available at

‎docs/pages/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ For a full in-depth list, have a look at the various requirement definitions in
3838

3939
### Tools
4040

41-
See our [dedicated section on CLI tools](/tools/).
41+
See our [dedicated section on CLI tools](/tools/overview).
4242

4343
### Extensions
4444

‎docs/settings/environment-variables.md‎

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,37 @@ However, `WS_ROOT` is only used by the workspace, therefore it contains the pref
2323

2424
### Workspace Variables
2525

26-
| ENV | Description | Read More |
27-
| ------------------------------ | --------------------------------------------------------------- | --------------- |
28-
| `WS_APT_DISABLE_DEBIAN_REPO` | Disables the default Debian repository | [→][apt] |
29-
| `WS_APT_DISABLE_EXTRAS_REPO` | Disables the additional extra *(3rd-party)* repository | [→][apt] |
30-
| `WS_APT_EXTRA_DEBIAN_REPOS` | Extra repository source definitions | [→][apt] |
31-
| `WS_APT_EXTRA_PACKAGES` | Extra APT packages to install at startup *(delimited by space)* | [→][apt] |
32-
| `WS_APT_UPDATE_REPOS` | Update APT repository cache | [→][apt] |
33-
| `WS_CLONE_WORKSPACE_REPO` | Clone a repository to the workspace directory on startup | [→][git] |
34-
| `WS_COMMENTS_DISABLE_FONT` | Disable the custom comments font | [→][fonts] |
35-
| `WS_DISABLE_SUDO` | Disable `sudo` privileges | |
36-
| `WS_CONFIGURE_DOCKER` | Attempt to auto-configure docker | [→][docker] |
37-
| `WS_CONFIGURE_HELM` | Autoload helm repository cache | [→][helm] |
38-
| `WS_EXTRA_CA_CERT_ENDPOINTS` | Extra CA endpoints to install at startup *(delimited by space)* | [→][ca] |
39-
| `WS_EXTRA_CA_CERT_INSECURE` | Use insecure communication when installing CA endpoints | [→][ca] |
40-
| `WS_EXTRA_FEATURES` | Extra features to install at startup *(delimited by space)* | [→][features] |
41-
| `WS_EXTRA_VS_EXTENSIONS` | Extra extensions to install at startup *(delimited by space)* | [→][extensions] |
42-
| `WS_EXTRA_VS_EXTENSIONS_DIR` | Directory of extensions to install at startup *(`*.vsix`)* | [→][extensions] |
43-
| `WS_PASSWORD` | Password for login authentication | [→][auth] |
44-
| `WS_PASSWORD_HASHED` | Hashed *(`argon2`)* password for login authentication | [→][auth] |
45-
| `WS_PORT` | Specify the server port *(default: `8080`)* | |
46-
| `WS_PROXY_DOMAIN` | Specify a domain name for proxying services' ports | [→][ports] |
47-
| `WS_PROMPT_DISABLE_DOCKER` | Disable the `docker` module of the terminal prompt | [→][terminal] |
48-
| `WS_PROMPT_DISABLE_HOSTNAME` | Disable the `hostname` module of the terminal prompt | [→][terminal] |
49-
| `WS_PROMPT_DISABLE_KUBERNETES` | Disable the `kubernetes` module of the terminal prompt | [→][terminal] |
50-
| `WS_PROMPT_DISABLE_NODEJS` | Disable the `nodejs` module of the terminal prompt | [→][terminal] |
51-
| `WS_PROMPT_DISABLE_PYTHON` | Disable the `python` module of the terminal prompt | [→][terminal] |
52-
| `WS_PROMPT_DISABLE_USER` | Disable the user module of the terminal prompt | [→][terminal] |
53-
| `WS_ROOT` | Root directory for the workspace *(default: `/workspace`)* | |
54-
| `WS_ZSH_PLUGINS` | Specifies the `zsh` plugins to be enabled in each session | [→][terminal] |
55-
| `WS_ZSH_EXTRA_PLUGINS` | Adds additional `zsh` plugins to the existing defaults | [→][terminal] |
26+
| ENV | Description | Read More |
27+
| --------------------------------- | --------------------------------------------------------------- | --------------- |
28+
| `WS_APT_DISABLE_DEBIAN_REPO` | Disables the default Debian repository | [→][apt] |
29+
| `WS_APT_DISABLE_EXTRAS_REPO` | Disables the additional extra *(3rd-party)* repository | [→][apt] |
30+
| `WS_APT_EXTRA_DEBIAN_REPOS` | Extra repository source definitions | [→][apt] |
31+
| `WS_APT_EXTRA_PACKAGES` | Extra APT packages to install at startup *(delimited by space)* | [→][apt] |
32+
| `WS_APT_UPDATE_REPOS` | Update APT repository cache | [→][apt] |
33+
| `WS_CLONE_WORKSPACE_REPO` | Clone a repository to the workspace directory on startup | [→][git] |
34+
| `WS_COMMENTS_DISABLE_FONT` | Disable the custom comments font | [→][fonts] |
35+
| `WS_DISABLE_SUDO` | Disable `sudo` privileges | |
36+
| `WS_CONFIGURE_DOCKER` | Attempt to auto-configure docker | [→][docker] |
37+
| `WS_CONFIGURE_HELM` | Autoload helm repository cache | [→][helm] |
38+
| `WS_EXTRA_CA_CERT_ENDPOINTS` | Extra CA endpoints to install at startup *(delimited by space)* | [→][ca] |
39+
| `WS_EXTRA_CA_CERT_INSECURE` | Use insecure communication when installing CA endpoints | [→][ca] |
40+
| `WS_EXTRA_FEATURES` | Extra features to install at startup *(delimited by space)* | [→][features] |
41+
| `WS_EXTRA_VS_EXTENSIONS` | Extra extensions to install at startup *(delimited by space)* | [→][extensions] |
42+
| `WS_EXTRA_VS_EXTENSIONS_DIR` | Directory of extensions to install at startup *(`*.vsix`)* | [→][extensions] |
43+
| `WS_GIT_CREDENTIAL_CACHE_TIMEOUT` | Git credential cache timeout in seconds *(default: 1 hour)* | [→][git] |
44+
| `WS_PASSWORD` | Password for login authentication | [→][auth] |
45+
| `WS_PASSWORD_HASHED` | Hashed *(`argon2`)* password for login authentication | [→][auth] |
46+
| `WS_PORT` | Specify the server port *(default: `8080`)* | |
47+
| `WS_PROXY_DOMAIN` | Specify a domain name for proxying services' ports | [→][ports] |
48+
| `WS_PROMPT_DISABLE_DOCKER` | Disable the `docker` module of the terminal prompt | [→][terminal] |
49+
| `WS_PROMPT_DISABLE_HOSTNAME` | Disable the `hostname` module of the terminal prompt | [→][terminal] |
50+
| `WS_PROMPT_DISABLE_KUBERNETES` | Disable the `kubernetes` module of the terminal prompt | [→][terminal] |
51+
| `WS_PROMPT_DISABLE_NODEJS` | Disable the `nodejs` module of the terminal prompt | [→][terminal] |
52+
| `WS_PROMPT_DISABLE_PYTHON` | Disable the `python` module of the terminal prompt | [→][terminal] |
53+
| `WS_PROMPT_DISABLE_USER` | Disable the user module of the terminal prompt | [→][terminal] |
54+
| `WS_ROOT` | Root directory for the workspace *(default: `/workspace`)* | |
55+
| `WS_ZSH_PLUGINS` | Specifies the `zsh` plugins to be enabled in each session | [→][terminal] |
56+
| `WS_ZSH_EXTRA_PLUGINS` | Adds additional `zsh` plugins to the existing defaults | [→][terminal] |
5657

5758
### Tool Variables
5859

‎docs/tools/git.md‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Git logo](/icons/git.svg){.doc-image}
44

5-
`git` is at the core of every developer's workflow, at tool that cannot be ignored.
5+
`git` is at the core of every developer's workflow, a tool that cannot be ignored.
66
As such, a few features are provided out-of-the-box:
77

88
- Sane defaults.
@@ -11,7 +11,7 @@ As such, a few features are provided out-of-the-box:
1111
- Auto-configured signature key for signed commits.
1212
- Automatic cloning of a remote repository on startup.
1313

14-
## Configured Lookup
14+
## Configuration Lookup
1515

1616
The configuration lookup sequence is as follows:
1717

@@ -20,6 +20,25 @@ The configuration lookup sequence is as follows:
2020
- **User level *(`~/.gitconfig`)*:** allowing users to define their personal preferences
2121
and override configurations found in the *workspace level* file.
2222

23+
## Credential Cache
24+
25+
By default, Git caches your credentials in memory for one hour *(3600 seconds)* using the
26+
built‑in credential helper:
27+
28+
```ini
29+
[credential]
30+
helper = cache --timeout=3600
31+
```
32+
33+
When authenticating with a remote that requires basic authentication *(such as over HTTPS)*,
34+
Git will automatically reuse the cached credentials until the timeout expires.
35+
36+
The cached username and password are reused until the timeout expires.
37+
38+
Need a different duration?
39+
Set `WS_GIT_CREDENTIAL_CACHE_TIMEOUT` *(seconds)* before launching the container.
40+
Use `-1` to keep credentials for *one year*.
41+
2342
## Configuration Injection
2443

2544
Upon startup, the existence of both `env`s and files we will checked in order to
@@ -29,6 +48,7 @@ automatically configure user-level settings.
2948

3049
- **`GIT_COMMITTER_NAME`:** sets `[user.name]` in `~/.gitconfig` to the provided value.
3150
- **`GIT_COMMITTER_EMAIL`:** sets `[user.email]` in `~/.gitconfig` to the provided value.
51+
- **`WS_GIT_CREDENTIAL_CACHE_TIMEOUT`:** Overrides `[credential.helper]` timeout.
3252

3353
### Files
3454

File renamed without changes.

0 commit comments

Comments
 (0)