Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Issues cloning repository

Rahul Chandrashekar
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!
November 18, 2024

Whenever i try to clone a reposiotry i get the below error.

 

 

 

 

 

Command: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote https://username@bitbucket.org/workspace-id/repo-slug.git

Output:

Error: remote: Invalid credentials

fatal: Authentication failed for 'https://bitbucket.org/workspace-id/repo-slug.git/'

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 20, 2024

Hi Rahul and welcome to the community!

Based on the output you shared, you are using an HTTPS URL to clone the repo with a Bitbucket username. In this case, when you are asked for a password, you will need to provide an app password for the account whose username is in the URL. You can find more info on app passwords and how to generate one here:

A common mistake is using the account's password. An account's password can only be used for logging in to https://bitbucket.org/ from browser and not for Git operations via HTTPS, like cloning, pulling, pushing.

Can you please confirm if you are asked for a password during this operation? If so, does the command succeed when you provide an app password?

The app password will need at least Repositories - Read and Repositories - Write permissions for cloning and pushing to repos.

Just a heads up, I removed the username, workspace ID and repo URL from your post to protect your privacy, as this is a public forum.

Kind regards,
Theodora

Suggest an answer

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

Atlassian Community Events