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

Authentication failed when pushing/cloning/pulling from remote server

timongo
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 6, 2023

Hi everyone,

For some reason, bitbucket does not let me push/clone/pull when I try to do it from one of the remote servers I have access to. So, when I do it from my personal machine, bitbucket does not ask for any password and I can do all the things I want. When I am on the server, it asks for a password, when I input the password of my atlassian account, it answers "fatal: Authentication failed". So, I went to the security settings of my account and added the ssh public key in use on the server. But I am still required to input a password, which fails.

What am I doing wrong?

1 answer

1 accepted

1 vote
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 7, 2023

Hello @timongo and welcome to the Community!

Could you please confirm if you are using HTTPS or SSH to clone the repository?

The HTTP URL will look as follows : 

git clone git@bitbucket.org:WORKSPACE/REPOSITORY.git.git

while the SSH one will be as below : 

git clone https://USERNAME@bitbucket.org/WORKSPACE/REPOSITORY.git

In case you are using HTTPS, the password you are being prompted to provide is not the password used to log in to the UI, but a Bitbucket App Password. If you haven't already, you can create a new app password for your account and provide it when git asks you for the password.

However, if you are using SSH and git is asking for a password, you likely have protected your private SSH key with a password once you created it, and this password is required for git to be able to use that key. If you don't remember the ssh key password, you can create a new key (with or without a password), add it to your bitbucket profile, and try cloning the repository using this new key.

Hope that helps!

Let us know in case you have any questions.

Thank you, @timongo !

Patrik S

timongo
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 8, 2023

Thanks, that helps. Actually, I thought I had tried to do a git clone via ssh and that it did not work, but I must be wrong, because guided by your answer, I retried this morning and it worked. So I deleted my former copy and started over with a fresh clone, via git, and it dit not ask me for any password, certainly because I am using a passphrase-less rsa key.

tldr: it works, thanks for your help

Like Patrik S likes this

Suggest an answer

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

Atlassian Community Events