|
1 | 1 | <p align="center"> |
2 | | - <img src="https://github.com/Xgames123/gh-login/blob/main/gh-login-logo_200px_transparent.png?raw=true" alt="gh-login-logo"/> |
| 2 | + <img src="https://github.com/Xgames123/git-credential-github/blob/main/logo.png?raw=true" alt="logo"/> |
3 | 3 | </p> |
4 | 4 |
|
5 | 5 | A simple git [credentials helper](https://git-scm.com/docs/gitcredentials) for GitHub |
6 | 6 |
|
7 | | - |
8 | | - |
| 7 | + |
9 | 8 |
|
10 | 9 | # Features |
11 | | -1. Its way less bloated than [Git Credential Manager](https://github.blog/2022-04-07-git-credential-manager-authentication-for-everyone) |
12 | | -2. It relays to another credential helper. So you can use standard credential helpers with GitHub |
| 10 | +* 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 |
13 | 12 |
|
14 | 13 | # Install |
15 | 14 |
|
16 | 15 | ## Debian/Ubuntu |
17 | | -1. Download latest release and run ```dpkg -i gh-login.deb``` NOTE: Replace ```gh-login.deb``` with the file you just downloaded |
18 | | -2. Go to [configuring](#Configuring) |
| 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``` |
19 | 17 |
|
20 | 18 | ## Arch linux |
21 | | -Install gh-login form the AUR |
22 | | -```bash |
23 | | -git clone aur.archlinux.org/gh-login.git |
24 | | -cd gh-login |
25 | | -makepkg --syncdeps --install |
26 | | -``` |
27 | | -Or use an aur helper |
28 | | -```bash |
29 | | -yay -S gh-login |
30 | | -``` |
31 | | -Go to [configuring](#Configuring) |
| 19 | +Install git-credential-github form the AUR. [ArchLinux wiki](https://wiki.archlinux.org/title/Arch_User_Repository#Installing_and_upgrading_packages) |
32 | 20 |
|
33 | 21 | # Configuring |
34 | | -Set gh-login as your git credential helper for github urls |
35 | | - |
36 | | -```git config --global credential.https://github.com.helper "gh-login -b 'cache --timeout=86400'"``` |
37 | | - |
38 | | -This will set 'cache' with a timeout of 1 day (86400 seconds) as the backing helper. See https://git-scm.com/docs/gitcredentials |
39 | | - |
40 | | - |
| 22 | +```~/.gitconfig``` |
| 23 | +```ini |
| 24 | +[credential "https://github.com"] |
| 25 | + helper = github -b 'cache --timeout=86400' |
| 26 | +``` |
| 27 | +This sets the credential helper for github using the cache helper with a timeout of 1 day |
| 28 | + |
| 29 | +## More examples |
| 30 | + |
| 31 | +### Set only for repos owned by you |
| 32 | +```~/.gitconfig``` |
| 33 | +```ini |
| 34 | +[credentials] |
| 35 | + useHttpPath = true |
| 36 | +[credential "https://github.com/Xgames123"] # change to your name |
| 37 | + username=Xgames123 # change to your name |
| 38 | + helper = github -b 'cache --timeout=86400' |
| 39 | +``` |
41 | 40 |
|
| 41 | +### Using pass to store your credentials |
| 42 | +Install [git-credential-pass](https://github.com/Xgames123/git-credential-pass) |
| 43 | +```~/.gitconfig``` |
| 44 | +```ini |
| 45 | +[credential "https://github.com"] |
| 46 | + helper = github -b 'pass -p git/{host}/{username} -t ~/.config/git-credential-pass/default.template' |
| 47 | +``` |
| 48 | +See [git-credential-pass](https://github.com/Xgames123/git-credential-pass) for more info |
42 | 49 |
|
43 | 50 | # Bug or Error |
44 | 51 | If you find a bug, get an error or the docs are wrong. |
45 | | -* [Create an issue](https://github.com/Xgames123/gh-login/issues/new/) |
| 52 | +* [Create an issue](https://github.com/Xgames123/git-credential-github/issues/new/) |
46 | 53 | |
47 | 54 | * Message me on discord [ldev105](https://ldev.eu.org/socials/discord) |
0 commit comments