The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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
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

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
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
July 27, 2026

How do I create API token and pwd?

Gabriela - LeanZero
Atlassian Partner
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.

Like • Robert Wen_Cprime_ likes this
Ram Kumar Shrestha
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
July 27, 2026

Am I doing something wrong here?

Gabriela - LeanZero
Atlassian Partner
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.

Like • Robert Wen_Cprime_ likes this
Ram Kumar Shrestha
July 31, 2026

@Gabriela - LeanZero Thanks for the explaination. It works now. Thanks again

DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events