Skip to content

Commit 1d59a40

Browse files
committed
readme changes
1 parent 39779fe commit 1d59a40

File tree

2 files changed

+49
-10
lines changed

2 files changed

+49
-10
lines changed

PRE_v2_2_CONFIG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Configuring
2+
```~/.gitconfig```
3+
```ini
4+
[credential "https://github.com"]
5+
helper = github -b 'cache --timeout=86400'
6+
```
7+
This sets the credential helper for github using the cache helper with a timeout of 1 day
8+
9+
## More examples
10+
11+
### Set only for repos owned by you
12+
```~/.gitconfig```
13+
```ini
14+
[credential]
15+
useHttpPath = true
16+
[credential "https://github.com/Xgames123"] # change to your name
17+
username=Xgames123 # change to your name
18+
helper = github -b 'cache --timeout=86400'
19+
```
20+
21+
### Using pass to store your credentials
22+
Install [git-credential-pass](https://github.com/Xgames123/git-credential-pass)
23+
```~/.gitconfig```
24+
```ini
25+
[credential "https://github.com"]
26+
helper = github -b 'pass -p git/{host}/{username} -t ~/.config/git-credential-pass/default.template'
27+
```
28+
See [git-credential-pass](https://github.com/Xgames123/git-credential-pass) for more info

README.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,24 @@ A simple git [credentials helper](https://git-scm.com/docs/gitcredentials) for G
88

99
# Features
1010
* Its way less bloated than [Git Credential Manager](https://github.blog/2022-04-07-git-credential-manager-authentication-for-everyone)
11-
* It relays to another credential helper. So you can use standard credential helpers with GitHub
11+
* You can use it together with any other git credential helper of choice
1212

1313
# Install
1414

1515
## Debian/Ubuntu
16-
Download the .deb from the [latest release](https://github.com/xgames123/git-credential-github/releases/latest) and run ```dpkg -i file_you_just_downloaded.deb```
16+
Download the .deb from the [latest release](https://github.com/xgames123/git-credential-github/releases/latest) and run `dpkg -i file_you_just_downloaded.deb`
1717

1818
## Arch linux
1919
Install git-credential-github form the AUR. [ArchLinux wiki](https://wiki.archlinux.org/title/Arch_User_Repository#Installing_and_upgrading_packages)
2020

2121
# Configuring
22+
NOTE: Configuring changed after v2.2 [pre v2.2 config](PRE_v2_2_CONFIG.md)
23+
2224
```~/.gitconfig```
2325
```ini
2426
[credential "https://github.com"]
25-
helper = github -b 'cache --timeout=86400'
27+
helper = cache
28+
helper = github # important that you put it last because we only need to run gcg when other helpers have failed to give credentials
2629
```
2730
This sets the credential helper for github using the cache helper with a timeout of 1 day
2831

@@ -32,20 +35,28 @@ This sets the credential helper for github using the cache helper with a timeout
3235
```~/.gitconfig```
3336
```ini
3437
[credential]
35-
useHttpPath = true
38+
useHttpPath = true # makes git give the whole path instead of just https://github.com
3639
[credential "https://github.com/Xgames123"] # change to your name
3740
username=Xgames123 # change to your name
38-
helper = github -b 'cache --timeout=86400'
41+
helper = cache
42+
helper = github
3943
```
4044

41-
### Using pass to store your credentials
42-
Install [git-credential-pass](https://github.com/Xgames123/git-credential-pass)
45+
### Use pass as the credential helper for everything
4346
```~/.gitconfig```
4447
```ini
45-
[credential "https://github.com"]
46-
helper = github -b 'pass -p git/{host}/{username} -t ~/.config/git-credential-pass/default.template'
48+
[credential]
49+
useHttpPath = true # makes git give the whole path instead of just https://github.com
50+
helper = pass -r 3 -t ~/.config/git-credential-pass/default.template -p git/{protocol}/{host}/main
51+
52+
[credential "https://github.com/Xgames123"] # change to your name
53+
username=Xgames123 # change to your name
54+
helper = github
55+
56+
[credential "https://codeberg.org"]
57+
username=ldev
4758
```
48-
See [git-credential-pass](https://github.com/Xgames123/git-credential-pass) for more info
59+
4960

5061
# Bug or Error
5162
If you find a bug, get an error or the docs are wrong.

0 commit comments

Comments
 (0)