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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,250
Community Members
 
Community Events
176
Community Groups

pushing to bitbucket with app password

since bitbucket started requiring the use of app passwords  I haven't been able to push commits there anymore and have been accumulating local commits, I want to resume pushing to bitbucket but can't find any documentation on how to use app password when using git push!!?

when I tried just entering the app password as the password git asks for I get  a 403 as follows: 

remote: Your credentials lack one or more required privilege scopes.

fatal: unable to access 'https://bitbucket.org/jeromesteam/willy2k.git/': The requested URL returned error: 403
how do solve this..?

2 answers

that worked - thx.. (though not sure why ? as I had checked everything necessary in the prior app password) 
wasted a lot of time. but ok now thx.

0 votes
Ben Atlassian Team Apr 03, 2022

G'day Jerome!

We have documentation available for the change to instruct you on how to make usage of App Passwords:
https://community.atlassian.com/t5/Bitbucket-articles/Announcement-Bitbucket-Cloud-account-password-usage-for-Git-over/ba-p/1948231

Essentially, when connecting via HTTPS you will use your App Password alongside your username separated with a ":" character.

Therefore if you are authenticating to GIT over HTTPS to push/pull you will need to update your remote URL's to include the App Password:
git remote set-url origin https://USERNAME:APP_PASSWORD@bitbucket.org/username/reposlug.git
The same applies when performing git clone:
git clone https://USERNAME:APP_PASSWORD@bitbucket.org/username/reposlug.git
Hope this helps.
Cheers!
- Ben (Bitbucket Cloud Support)

I tried your suggestion of  running  remote  set-url in the format you suggested but got:

fatal: unable to access 'https://https://jmayeux@bitbucket.org/jeromesteam/willy2k.git/': Could not resolve host: bla bla.

also couldn't find any help with this on the url you posted (which I read before asking my question) 

Ben Atlassian Team Apr 11, 2022

Hi @jerome shaolin

The output which you have provided is incorrect and shows the https protocol twice, hence the "unable to access" error - the commands should be as follows:

git remote set-url origin https://jmayeux:APP-PASSWORD-HERE@bitbucket.org/jeromesteam/willy2k.git

 Then when performing git clone it should look like this:

git clone https://jmayeux:APP-PASSWORD-HERE@bitbucket.org/jeromesteam/willy2k.git

If you encounter continued issues with HTTPS, I would recommend potentially authenticating with SSH instead, there is documentation located here:
https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/

Cheers!

- Ben (Bitbucket Cloud Support)

my best interpretation of your last answer resulted in this command:
git remote set-url origin MYAPPPASSWORD@https://jmayeux@bitbucket.org/jeromesteam/willy2k.git
which also failed (screenshot below) , i'm still unable to push local commits to bitbucket!

bitbucket_sshot.png

my latest attempt was:
git remote set-url origin https://jmayeux:App_PASSWORD@bitbucket.org/jeromesteam/willy2k.git
and found myself back where I started!!? :-(

i.e. 

remote: Your credentials lack one or more required privilege scopes.

fatal: unable to access 'https://bitbucket.org/jeromesteam/willy2k.git/': The requested URL returned error: 403

Ben Atlassian Team Apr 18, 2022

Hey @jerome shaolin - the last command you have provided me is the correct format and should be the command that is entered to add that remote connection to the repo.

The error that you are receiving when trying to interface with the repo implies that you will need to check the App Password you have configured - it currently does not contain the necessary permissions granted to it to perform the task you are trying to accomplish.

Try creating a new App Password from within Personal Settings > Access Management: App Password and ticking all of the options for access (ie Read/Write/Admin). Once that has been done, then try running the remote command above again with the new App Password.

Once this is done - try to perform a clone/push and provide output if this does not work.
I would also suggest checking that there are no old passwords being cached in your system related to GIT (ie Windows Credential Manager, Mac Keychain Access) etc.

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events