An open API service indexing awesome lists of open source software.

https://github.com/gildas/git-credential-bitbucket

GIT credential helper for OAuth on Bitbucket Cloud
https://github.com/gildas/git-credential-bitbucket

bitbucket credential-storage git oauth

Last synced: 7 months ago
JSON representation

GIT credential helper for OAuth on Bitbucket Cloud

Awesome Lists containing this project

README

          

# git-credential-bitbucket

This is a git credential store for bitbucket's OAUTH.

It can be used with git remotes when neither the ssh protocol nor the basic authentication are available. Typically, the bitbucket account/repo has been configure to use OAUTH.

## Pre-requisites

You will need to create a bitbucket consumer to be able to use this credential store. See https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html.
Make sure you create a **private** consumer so you can use the `client_credentials` OAUTH grant type (the Callback URL can be a dummy).
As for the permissions, you need to give **admin** permissions to `repositories` and **write** to `Pull requests`.

Once created, collect the **key** and the **secret** from the consumer (click on the consumer name on the OAuth page)

## Installation

### Binaries

Download the binary for your platform from the [releases](https://github.com/gildas/git-credential-bitbucket/releases) page.

Unzip it and copy the executable in a folder that belongs to your `PATH`.

### Source

Get the source by cloning this repository and run:
```console
make install
```

By default the binary is installed in `/usr/local/bin`. You can choose another folder as long as it belongs to your `PATH` environment variable.

## Usage

### Adding credentials

You can add credentials by running the git credential tools:
```console
git credential-bitbucket store <