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/'
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.