How to enable HTTPS on localhost for Node.js
Sometimes, you may need to secure your localhost to test certain things, such... Read moreBitbucket password to clone a repo
Let's assume you already have a repository on Bitbucket, and you need to clone it locally. In the Bitbucket repository interface, there is a "Clone" button that opens a dialog with the option to choose the cloning method (HTTPS or SSH):
Typically, to avoid dealing with SSH keys, you can try copying the HTTPS repository link and then execute the git clone
command:
git clone https://[email protected]/geekrainian-workspace/test.git
As a result of executing the command, Bitbucket will prompt for a password:
But what password is it asking for, and why doesn't the account password work?
fatal: Invalid credentials
The first thing to understand is that it's not the account password.
Bitbucket uses a separate access management system called "App passwords", where you need to create an access password to use it when working with repositories.
To create an access password, follow these steps:
- Click on the gear icon to open the settings, then select "Personal Bitbucket Settings".
-
On the settings page, go to the "App passwords" section.
-
Click on the "Create app password" button to generate a new access password.
-
Set the access permissions as desired and click the "Create" button.
-
A dialog will appear with the generated password.
Now, if we try to clone the repository again, after entering the password, the operation will complete successfully:
git clone https://[email protected]/geekrainian-workspace/test.git
Cloning into 'test'...
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (4/4), 964 bytes | 68.00 KiB/s, done.
Good to know:
- Passwords do not have an expiration date and they will remain valid until you revoke them in the Bitbucket settings.
- The password is cached in the system, so you don't need to enter it every time you need to perform an action on the repository.
You may also like
How to reinitialize multiple TinyMCE editors
At some point, there was a need to reload multiple TinyMCE editors on one page,... Read moreSending GitHub updates to Discord via webhooks
Have you ever wanted to receive GitHub repository updates on your Discord... Read more