Giter Club home page Giter Club logo

git-credential-bitwarden's Introduction

git-credential-bitwarden

What is this?

This scirpt is git subcommand credential-bitwarden which manages git credential using Bitwarden CLI.

Why this is created?

I personally use Bitwarden to manage my credentials. So I'd like to store GitHub access key using Bitwarden on my Linux PC.

For macOS, there is an embedded integration credential-osxkeychain in Git command but it doesn't work on Linux.

How it works

The command is called by git bommand if needed.

To use the integration, you have to configure valid BW_SESSION environment variable.

The BW_SESSION value can be obtained/configured by the following commands.

$ bw login
$ bw unlock

...

$ export BW_SESSION="....."

Requirements

How to install

1. Download the script git-credential-bitwarden under a directory in your PATH

If you don't have proper directory to install, the following commands will work.

$ mkdir ${HOME}/bin
$ export ${HOME}/bin:${PATH} >> ${HOME}/.bashrc
$ source .bashrc

Download the file git-credential-bitwarden.

$ curl -o ${HOME}/bin/git-credential-bitwarden https://raw.githubusercontent.com/superdaigo/git-credential-bitwarden/master/git-credential-bitwarden

2. Change file mode to 755

$ chmod +x ${HOME}/bin/git-credential-bitwarden

3. Configure git credential helper

$ git config --global credential.helper bitwarden

How to uninstall

1. Delete downloaded script

$ rm ${HOME}/bin/git-credential-bitwarden

2. Remove config git credential.helper

$ git config --global --unset credential.helper

You might be able to remove ${HOME}/bin directory and PATH configuration from your ${HOME}/.bashrc file.

Known issue

  • Need to unlock and reregister BW_SESSION after the expiration.
  • The command is slow.

git-credential-bitwarden's People

Contributors

superdaigo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.