Cloning repo using password in git clone command causes issue

Nabih Bawazir
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 6, 2023

I'm using an AWS instance to deploy a code, my first step I to clone the code in AWS instance.
The cloning request required me to input password, the password is successfully for login bitbucket website, but when I try to input password for cloning, it failed

```
nabih@aws9-1:~$ git clone https://USERNAME@bitbucket.org/company_name/user_service.git
Cloning into 'user_service'...
Password for 'https://USERNAME@bitbucket.org':
```

After input password, I am use password that successfully login in bitbucket website, here's the error message

```
remote: Login failed due to incorrect login credentials or method.
remote: If you are unsure of which login details or login method to use, visit:
remote: https://support.atlassian.com/bitbucket-cloud/docs/log-into-or-connect-to-bitbucket-cloud/
fatal: Authentication failed for 'https://bitbucket.org/company_name/user_service.git/'
```

What the possibility beside the wrong password?

2 answers

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 8, 2023

Hello @Nabih Bawazir ,

To authenticate git operation over HTTPS you will need to provide an App Password, and not the account password (the password you use to login in the UI).

You can create an App Password following the instructions in Create an App Password documentation. To clone the repository, the app password should have at least the repository:read scope.

Also, I removed your username from the question description to protect your privacy, as this is a public forum.

Thank you, @Nabih Bawazir !

Patrik S

0 votes
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 7, 2023

I don't know why the password is not accepted (assuming it is correct), but you could try the SSH-based clone. That will not ask for your password. (It is secured by using SSH keys.)

See: https://support.atlassian.com/bitbucket-cloud/docs/set-up-personal-ssh-keys-on-linux/

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events