← Back to list

How to Store Bitbucket App Password in Linux Using Git Credential Manager

Table of Contents

Virendra Giri · 2023-05-13 17:36 · 0 claps · 2.0 min read
#bitbucket #git-credentials #linux #devops
Open on Medium ↗
Wiki topics: ☁️ · DevOps & Cloud 🔓 · Open Source

How to Store Bitbucket App Password in Linux Using Git Credential Manager

Table of Contents

  • Introduction
  • Step 1: Install Git (if not installed)
  • Step 2: Configure Git to use the Git Credential Manager
  • Step 3: Manually create credentials file and add credentials (Optional)
  • Step 4: Store and manage Bitbucket app password
  • Conclusion

Introduction

Storing your Bitbucket app password securely in Linux can save you time and improve your workflow by allowing you to avoid entering your credentials every time you interact with your Bitbucket repositories. In this blog post, we will show you how to store your Bitbucket app password in Linux using the Git Credential Manager. We will assume that you already have Git installed on your system. If not, please follow the instructions in the first step below.

Step 1: Install Git (if not installed)

First, you need to ensure that Git is installed on your system. To install Git, open your terminal and run the following commands:

sudo apt-get update
sudo apt-get install git

This will update your package list and install Git on your system.

Step 2: Configure Git to use the Git Credential Manager

Once Git is installed, you need to configure it to use the Git Credential Manager. To do this, run the following command in your terminal:

git config --global credential.helper manager-core

This command sets the Git credential helper to the Git Credential Manager Core, which will securely store your app password for future use.

Step 3: Manually create credentials file and add credentials (Optional)

You can also manually create the credentials file and add your Bitbucket app password to it. First, create the ~/.git-credentials file:

touch ~/.git-credentials

Next, open the ~/.git-credentials file with your preferred text editor, like nano, vim, or gedit:

nano ~/.git-credentials

Now, add your Bitbucket credentials to the file in the following format:

https://<username>:<app_password>@bitbucket.org

Replace with your Bitbucket username and <app_password> with your app password. Save the file and close the text editor.

Step 4: Store and manage Bitbucket app password

Now that Git is configured to use the Git Credential Manager, the next time you interact with a Bitbucket repository (e.g., clone, fetch, or push), the stored credentials will be used.

If you need to update or delete the stored credentials, you can do so by editing the ~/.git-credentials file, as shown in step 3. Be cautious when editing this file, as it contains sensitive information.

Conclusion

By following these steps, you can securely store your Bitbucket app password on your Linux system, making your interactions with your Bitbucket repositories more efficient. Remember to treat app passwords as sensitive information and be cautious when sharing or storing them. Consider using additional security measures, like encrypting the credentials file, to further protect your information.

Originally published at https://virendra.dev.


메타데이터
post_id
42e42ad9799f
slug
how-to-store-bitbucket-app-password-in-linux-using-git-credential-manager-42e42ad9799f
url
https://medium.com/@virendragiri1/how-to-store-bitbucket-app-password-in-linux-using-git-credential-manager-42e42ad9799f
canonical_url
https://medium.com/@virendragiri1/how-to-store-bitbucket-app-password-in-linux-using-git-credential-manager-42e42ad9799f
author_url
https://medium.com/@virendragiri1
status
ok
fetched_at
2026-07-30 09:18:59