Forums

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

User credentials are invalid while cloning a repository from the cloud but login is correct

Ram Kumar Shrestha
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!
July 27, 2026

Hello Atlassian team,

I am facing an issue with the credential when cloning a repository from the cloud server. I am able to login to the atlassian dashboard and home page but when I try to clone a repository from the project folder It ask me for a user credentials and when I provide the email address and the pwd it says incorrect/invalid credentials. Could you please help me in resolving this issue? Which credentials needs to be given while cloning the repository? Is the credential for login to cloud different from the credentials while cloning?

 

1 answer

0 votes
Robert Wen_Cprime_
Community Champion
July 27, 2026

The credentials for Cloud are a bit different.  Bitbucket Cloud wants your username and an API token created from your Atlassian account.

Ram Kumar Shrestha
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!
July 27, 2026

How do I create API token and pwd?

Gabriela - LeanZero
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 27, 2026

Hi @Ram Kumar Shrestha, different credentials, yes. Bitbucket Cloud doesn't accept your Atlassian account password over HTTPS, which is why the clone prompt rejects it while the web login is fine.

Go to id.atlassian.com/manage-profile/security/api-tokens, choose Create API token with scopes, name it, set an expiry, pick Bitbucket as the app, then tick read:repository:bitbucket for cloning and write:repository:bitbucket as well if you'll push. Copy it there and then. It's shown once.

At the git prompt the username is the literal x-bitbucket-api-token-auth and the password is the token. Email plus token works for REST API calls, but git won't take that pairing.

Ram Kumar Shrestha
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!
July 27, 2026

Thanks Gabriela for the information. I have created the token and saved it. Now when I try to clone the repository, I get a pop with asking user id and email. I gave user id as 

 

user id:  x-bitbucket-api-token-auth

Pwd: generated api token.

but it still says invalid credentials.

Bitbucket_credentials.jpg

bitbucket_inavald_credentials.jpg

 

thanks and regards

Ram

 

Ram Kumar Shrestha
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!
July 27, 2026

Am I doing something wrong here?

Gabriela - LeanZero
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 27, 2026

Hi @Ram Kumar Shrestha, that box in your screenshot isn't git asking you. It's Git Credential Manager's own Connect to Bitbucket dialog, and it's logging you in as an account, which is why it offers Can't log in and Sign up for an account underneath. x-bitbucket-api-token-auth isn't an account, it only means something to git itself, so that dialog turns it down.

Put your real Bitbucket username in there instead, the one on your bitbucket.org Personal settings page, with the same token as the password. Atlassian documents that flow as Bitbucket username and API token.

The static username does still work. Not in that dialog though. To prove the token itself is good, skip the helper for one command:

git -c credential.helper= clone https://bitbucket.org/WORKSPACE/REPO.git

An empty credential.helper resets the helper list, so git prompts you in the terminal and the static username goes through.

Suggest an answer

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

Atlassian Community Events