My Bitbucket account is tied to my corporate google account, I can easily log into Bitbucket & sourcetree. When I start sourcetree it goes through the authentication and loads the list of my repositories. However, I am unable to clone a repository with sourcetree->Git or when using Git independently. The result is the same, "Error: remote: Invalid credentials
fatal: Authentication failed" I find this odd as the password and username are what I used to access bitbucket in the first place. I have looked at API/App passwords, reset my password on bitbucket, delete the password file, and updated Git with no luck. If anyone has seen this before and knows where I am going wrong I would appreciate any insight.
Hey @Stephen Butler and welcome to the Community!
From the error message you are receiving, I suspect you might be using the wrong credentials for authentication. In Bitbucket Cloud, to authenticate Git operations over HTTPS, you will need to provide the following credentials :
After confirming your username and creating an app password, you can use the below command in your system's terminal to clone the repository :
git clone https://USERNAME:APP_PASSWORD@bitbucket.org/WORKSPACE/REPOSITORY.git
Replacing USERNAME and APP_PASSWORD with their corresponding values.
Hope that helps! Let me know in case you have any questions.
Thank you, @Stephen Butler !
Patrik S
I had tried using my app password before but never inline in the Git cmd string. This worked for me. thank you very much for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What are the "Details" associated with this error?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you see a button labeled as "Details" on the error dialog? If so, I was wondering what the "Details" dialog contained.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Error from Cloning:
Command: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote https://mycorrectusername@bitbucket.org/mycompanyname/labview-modules.git
Output:
Error: remote: Invalid credentials
fatal: Authentication failed for 'https://bitbucket.org/mycompanyname/labview-modules.git/'
I tried your above procedure, went through as thought all was working fine, but when I go to Remote Clone I still get the above error. I've checked my login name and password. My Edit Host Account returns with Authentication OK.
All this is happening because I had to reinstall SourceTree because company policy update crashed my computer.
What else is causing the issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.