Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xgames123/git-credential-pass
A simple git credential helper for gnu pass
https://github.com/xgames123/git-credential-pass
git git-credential git-credential-helper gnu pass password-store
Last synced: about 24 hours ago
JSON representation
A simple git credential helper for gnu pass
- Host: GitHub
- URL: https://github.com/xgames123/git-credential-pass
- Owner: Xgames123
- Created: 2023-11-05T16:53:29.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-19T14:20:09.000Z (9 months ago)
- Last Synced: 2024-02-19T15:43:02.017Z (9 months ago)
- Topics: git, git-credential, git-credential-helper, gnu, pass, password-store
- Language: Rust
- Homepage:
- Size: 44.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A Simple [git credential helper](https://git-scm.com/docs/gitcredentials) for [pass](https://www.passwordstore.org/)
If the templating language is not powerful enough and you only want to read passwords from pass look at [pass-git-helper](https://github.com/languitar/pass-git-helper)
# Features
* Can store, get and erase passwords from pass
* Mostly uses .gitconfig for configuration
* Very simple template language# Installation
## Archlinux
Install git-credential-pass from AUR [ArchLinux wiki](https://wiki.archlinux.org/title/Arch_User_Repository#Installing_and_upgrading_packages)
## Debian/Ubuntu
Download the .deb file from the [latest release](https://github.com/Xgames123/git-credential-pass/releases/latest) and use ```dpkg -i file_you_just_downloaded.deb``` to install it
# Configuring
```~/.config/git-credential-pass/git.ldev.eu.org.template```
```
{password}
login: {username}
``````~/.gitconfig```
```ini
[credential]
helper = pass --pass-name "git/{protocol}/{host}" --template "~/.config/git-credential-pass/{host}.template"
```
> **NOTE**
> Text between {} gets replaced by the value returned by git. See [custom_helpers](https://git-scm.com/docs/gitcredentials#_custom_helpers).> **NOTE**
> Use \\ to escape characters \\{ will be treated as a literal## More examples
### Store passwords as git/{host}/{username}
```~/.gitconfig```
```ini
[credential]
helper = pass -p "git/{host}/{username}" --template "~/.config/git-credential-pass/{host}.template"
```### Use only for a specific host
```~/.gitconfig``````ini
[credential "https://git.ldev.eu.org"] # only use git-credential-pass for git.ldev.eu.org
useHttpPath = true
helper = pass -p "git/ldev" --template "~/.config/git-credential-pass/git.ldev.eu.org.template"
[credential] # use cache for everything else
helper=cache
```### Store credentials using url
```~/.gitconfig```
```ini
[credentials]
useHttpPath = true # this line is to make git send the path
# Store the credentials using the url path
helper = pass -p "git/{path}" --template "~/.config/git-credential-pass/template.template"
```