Authentication failed for bitbucket
Asked Answered
S

4

5
git init
git add .
git commit -m 'nazwa commita'
git remote add origin https://NazwaUż[email protected]/NazwaUżytkownika/test.git
git push -u origin --all

I must enter pass and email. When I enter mail and pass I get the error " failed to auth".

I tried

git remote add origin https://username:[email protected]/username/projekt.git

and that worked.

Now I must use

git clone (here link to bitbucket)

and this doesn't work: I get the error

remote: Unauthorized fatal: Authentication failed for.

When I'm using username:pass@bitbucket I get error 500 ....

Sub answered 25/3, 2017 at 0:28 Comment(9)
Are there any special characters (like a !) in your password? If so you need to percent-encode those characters in the urlRhizotomy
im don't have special characters... :(Sub
Can you log in successfully on bitbucket?Rhizotomy
Yes.. my friend have this same problem too..Sub
We use this polish tutorial: mwin.pl/unity3d-quicktip-43-praca-zespoleSub
Have you tried ssh or are you dead set on using https?Moonraker
Im don't tried use ssh.. Im dont understand this..Sub
Maybe you have any english tutorial how to work with team?Sub
you have special characters in your username - "NazwaUżytkownika". Try creating a new bitbucket repo with some test user who has onli ascii chars and see if it worksNarrative
L
9

I faced a similar issue while cloning a repository from Bitbucket. Here is one possible solution that worked out for me. As per their access management system, Bitbucket has this security thing known as "App passwords". You can find it under 'Personal settings → Access Management → App passwords' as shown below. Bitbucket.Personal.Settings

  • Once there, click on it and it will take you to the app password dashboard/list that you have created for your account (In your case, it should be empty). Now click on Create app password.

Bitbucket.App.Password.Page

  • You will be able to see a list of checkboxes denoting various permissions. Check them all. Give your app password a meaningful name(label) which will be for your future reference and hit Create as shown below.

App.Password.Options

  • You will see a modal window popup with a unique app password generated by Bitbucket. You will also receive a mail notifying that an App password was created. This is important, so store this password somewhere safe. You will be needing it during cloning your repo from any git client.

App.Password.Unique.Value App.Password.List

  • You can also revoke this password at any time and create a fresh one.
  • You should be able to see the newly created app password in the app password list page. Now use this unique app password while cloning into a repository instead of your account password.
Leora answered 3/5, 2021 at 9:52 Comment(2)
Nice tutorial. Does one need to enter this new unique app password every time afterwards? Why this password worked but not my user account password which has admin rights to my repository?Nellie
@Nellie Lately version control applications like GitHub, Bitbucket, etc. have been implementing this concept of PAT(Personal Access Token) for security reasons. Post these changes, I feel that passwords are of no use now while communicating with your remote repository. So basically, Personal access tokens are an alternative to using passwords for authentication to when using the GitHub/Bitbucket API or the command line.Leora
B
1

This should work; I have used it many times with bitbucket for my Scala courses:

git clone https://username:[email protected]/username/projekt.git

Git credentials is a way for you to not have to type in username and password all the time.

You might want to look at URL encoding for the special characters.

SSH is best. Yes, it is confusing at first. Eventually you will need to learn this.

Bryon answered 26/12, 2017 at 15:43 Comment(0)
W
1

What worked for me was changing my password. Not through the admin page ("My Atlassian Account"), which also didn't work. Instead, log out of BitBucket, click on the password recovery link, and follow that process. Try again with your new account password.

Wiggs answered 3/9, 2018 at 19:45 Comment(0)
L
0

So, I was having this problem on a project recently. I went to my ~/.ssh/confg file (mac) and checked it. It looked correct as I had all my identity files listed under bitbucket.org example:

Host bitbucket.org
  HostName bitbucket.org
  User git
  IdentityFile ~/.ssh/identity_file_1
  IdentityFile ~/.ssh/identify_file_2
  IdentityFile ~/.ssh/identify_file_3
  IdentitiesOnly yes

But, it wasn't working.

This is what worked:

Host bitbucket.org
  HostName bitbucket.org
  User git
  IdentityFile ~/.ssh/identity_file_1
  # IdentityFile ~/.ssh/identify_file_2
  # IdentityFile ~/.ssh/identify_file_3
  IdentitiesOnly yes

Yeah, just commenting it out for now. Just want to be able to switch between identities for different projects.

Hope this helps!

Laccolith answered 24/8, 2023 at 1:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.