Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

how to updload my code into new repository

juerg
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!
February 11, 2024

I can not push my local repository to a newly created repository on bitbucket
I cd to my project folder, then enter
git init
git add -A (needed to add an exception on the first try)
git commit -m 'initial commit'
this list my files in the local repository
git remote add origin https://bitbucket.org/...
git push -u origin main

I am asked for username and password
very confusing what my 'username' would be but I tried all possible combinations and I am very sure that I entered the correct password (I can at least login to bitbucket with it)
the response is always 'Invalid credentials'

I have even tried to completely sign off from bitbucket and atlassian, waited the 10 days period and started from  fresh.

I still get "invalid credentials" and am completely stuck

2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 13, 2024

Hi @juerg and welcome to the community!

When you clone, pull, or push to a Bitbucket repo with basic authentication over HTTPS, you need to use the following credentials:

Your account's password can be used only for logging in to https://bitbucket.org/ from browser, it cannot be used for Git operations over HTTPS.

When you set a remote URL for your clone, it is also common to include the username in the URL as follows:

git remote add origin https://username@bitbucket.org/workspace-id/repo.git

Please feel free to let us know how it goes and if you need further assistance.

Kind regards,
Theodora

0 votes
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 12, 2024

I think the username would be the email address you created your Atlassian account with.

But, for the long run, your life will be easier if you use SSH based authentication. It will not ask for credentials at every push and it is secure.

Suggest an answer

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

Atlassian Community Events