Forums

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

Can't make a push to the remote bitbucket's repo

Samir Ihaddadene
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 2, 2025

I tried to make a push from my local repo to bitbucket's repo using VsCode terminal and the Git command

git push -u origin main

then a modal displays in order to give it my credentials, but after that, when I click on "Continue" button, it says "fatal: invalid credentials" in the Vscode terminal, I have no idea why I get this answer all the time, 

 

I even tried to create the API token as a password for that modal, but it still the same, it doesn't work. 

 

Have you ever came across such issue ? 

Or may be because I'm using Bitbucket's free plan ? 

 

Thanks in advance.

1 answer

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 3, 2025

Hey @Samir Ihaddadene 

Welcome to the community!

When prompted to enter your credentials, did you use your username and API token or your email and API token? To authenticate with Git, you should use your username and API token.

Also, make sure to grant your API token the proper permissions to push, such as write permission.

Regards,
Syahrul

candidat_sam
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 4, 2025

Hey @Syahrul !

Thanks for the answer, 

Yes, I tried with the username (not the email)+ API token (as a paswd),

I granted the API token the proper permissions as well, 

 

By the way, I tried to do a push to github by creating a new project there, and it worked so so so easily comparing to Bitbucket, I can't make either a push or a pull.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events