Skip to content
Snippets Groups Projects
Select Git revision
  • 6ca1544b439f931c9acfd3c7c9e1c9d9c1b36e2c
  • main default protected
  • renovate/pre-commit-pre-commit-hooks-6.x
3 results

credentials-helper.md

Blame
  • user avatar
    T. Hinrichsmeyer authored
    6ca1544b
    History

    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

    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"