Skip to content

A credential helper for Git that utiilzes the bw bitwarden command line interface

License

Notifications You must be signed in to change notification settings

AZMCode/git-credential-bw-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Git Credential Helper for Bitwarden CLI

This script provides Git with Bitwarden credentials, and caches a session key on disk, revokable at any time running bw lock.

It currently only implements the get command.

Dependencies

Installation

Running this command will install the helper in either ~/.local/bin if it exists, otherwise with sudo in /usr/bin. It will also configure the helper to be used

curl -s https://raw.githubusercontent.com/AZMCode/git-credential-bw-shell/master/installer.sh | bash -s

Manual Installation

  1. Download the git-credential-bw script somewhere in $PATH or $GIT_EXEC_PATH, and give it execute permissions
  2. Run git config --add credential.helper bw or git config --global --add credential.helper bw depending on whether you want the helper used globally or only in the current repository.

Configuration

Within the script there are these variables, which can be used to configure the following things:

  • Session Cache Filepath
    • The program caches a session key in a file, this determines the path of it. Points to /tmp/git-credential-bw.key by default.
  • Item Search String
    • Bitwarden requires a search string to find the item that contains the login credentials for Git. Is git by default.
  • Maximum Attempts
    • The program will attempt to get the credentials for a maximum of 3 times by default. This setting can change that. -1 results in the program never ceasing attempts.

Author and Copyright

Adriano Zambrana Marchetti
Licensed under GPLv3. See LICENSE file for more details

About

A credential helper for Git that utiilzes the bw bitwarden command line interface

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages