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,457,480
Community Members
 
Community Events
176
Community Groups

Error encountered while pushing to the remote repository

Edited

I'm no longer able to push changes from my local git repository to bitbucket.  I'm using Visual Studio to integrate to bitbucket and I get the following error

Failed to push to the remote repository. See the Output window for more details.
Pushing master
Error encountered while pushing to the remote repository: Git failed with a fatal error.
Git failed with a fatal error.
Invalid credentials
Logon failed, use ctrl+c to cancel basic credential prompt.
cannot spawn /c/program files (x86)/microsoft visual studio/2019/community/common7/ide/commonextensions/microsoft/teamfoundation/team explorer/Git/mingw32/libexec/git-core/git-askpass.exe: No such file or directory
could not read Password for 'https://<username>@bitbucket.org': terminal prompts disabled

My credentials have not changed not has my password its just stopped working. I know there has been some update that requires some kind of change my side so I tried creating an App Password this created a label and password which I tried to use to log in and push my code but the error was the same.  Any idea how I'm supposed to get this to work?

4 answers

I had the same problem. This is what I did to fix it:

  1. Create a Bitbucket application password as described here and record it. https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/
  2. Ignore the instructions on how to add the password to Visual Studio.
  3. In Visual Studio, try to push one of your repos to the remote site.
  4. When prompted for log in credentials, enter your user name, NOT your email, and the application password.
  5. Click yes, authorize, etc. in all additional windows or web pages that pop up to authorize the push.
  6. After you have done this once successfully, pushing other repos should function normally.

worked for me too. Thank You

I incurred the same issue today within Visual Studio 2019. Although, I was well aware this would happen, given Atlassian's notice stating "Beginning March 1, 2022, you will no longer be able to use your Atlassian account password when using Basic authentication with the Bitbucket API or Git over HTTPS."

To solve the issue, I accessed the Credential Manager, using windows search bar, and clicked on Windows Credentials icon.  Under Generic Credentials section, I selected git:https://bitbucket.org which in turn expanded the item and allowed for me to click Edit. This is where I changed the password to my App Password
After clicking save, I did the same for the other Generic Credentials shown in the list related to my Bitbucket user url, e.g. git:https://myuser1@bitbucket.org
Afterwards, I restarted the computer just in case. 

Then, I opened my Visual Studio project and initiated a push request under Git Changes tab.  A blue popup appeared, requiring OAuth verification.  After I clicked the button titled Verify, I was directed to a browser page asking me to "Confirm access to your account" "Sourcetree for Windows is requesting access to the following" [ref 1st image].

After clicking the Grant Access button, I was redirected strangely to a localhost address.
This was prevented due to browser settings, which automatically redirected to https [ref image 2].  Therefore, I needed to copy that localhost address into a new incognito window and kaboom! it work. I was greeted with a verification approved message and was able to initiate Git request from Visual Studio again.

git_1.pnggit_2.png

Great Job Atlassian..

How to broke a working system from one moment to another without a proper fix and waste developers time.

0 votes

Hi Paul,

An app password should be used in combination with your Bitbucket username, not with the label of the app password.
You can find your Bitbucket username here: https://bitbucket.org/account/settings/

I would recommend first testing the operation (git push) from a terminal application:
- Are you asked for a password when you try to push from terminal?
- If so, are you able to push when you provide the app password?

If you are not asked for a password, then a credential manager is used locally. I would suggest removing any stored credentials for bitbucket.org from the credential manager, and then try again.

With regards to Visual Studio, I would also suggest checking if your authentication details for Bitbucket are stored in some configuration settings. If so, I would suggest removing them and replacing them with your Bitbucket username + app password.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events