Select Git revision
credentials-helper.md
credentials-helper.md 3.00 KiB
Git credentials helpers
Cache daemon running in background:
git credential-cache--daemon /home/varac/.cache/git/credential/socket
git-credential-oauth
- GitHub
- Golang
- How it works
- Downside: Each repo needs to get allowed with OAuth, doesn't scale ell with tools like gitlabber i.e.
Install:
pamac install git-credential-oauth
Configure:
git config --global --unset-all credential.helper
git config --global --add credential.helper "cache --timeout 21600" # six hours
git config --global --add credential.helper oauth
Custom Gitlab host
- Custom Gitlab hosts need to get registered manually, until Preconfigure Git Credential Manager as instance-wide OAuth application is solved.
- Docs: Custom hosts
Edit ~/.config/git/config
or:
export GITLAB_URL=https://0xacab.org
git config --global credential.${GITLAB_URL}.oauthClientId $(gopass show --password mnt/ndr/token/0xacab.org/varac/application/git-credential-oauth/id
git config --global credential.${GITLAB_URL}.oauthScopes read_repository write_repository
git config --global credential.${GITLAB_URL}.oauthAuthURL /oauth/authorize
git config --global credential.${GITLAB_URL}.oauthTokenURL /oauth/token
git config --global credential.${GITLAB_URL}.oauthDeviceAuthURL /oauth/authorize_device
Test/Debug
export GIT_TRACE=1
echo url=https://gitlab.com | git credential fill
Configure custom Gitlab hosts
Custom GitLab instance support
Issues
git-credential-manager
Gopasspw git-credential-gopass
Install:
pamac install git-credential-gopass
git help -a | grep gopass
Setup:
git config --global credential.helper gopass
Setup for specific store/mount:
git config --global credential.helper "gopass --store=work"