fatal: Authentication failed when pushing to bitbucket.org

Viewed 71

Hi on a linux system and having a really difficult time pushing a few of my commits. when I do git push I get this message which I then enter the password but I keep getting

git push 

when I enter my password it cannot authenticate

fatal: Authentication failed 

I have tried to modified my ./.git/config and entered

[credential]
        name = xxx
        email = xx
[user]
        name = xxx
        email = xx

both are the same

I also have other projects on the main github.com and that seems to work fine. is there anything I can try?

there was a similar issue but it was on a windows box, "Fatal: authentication failed" error when pushing to bitbucket repo

thanks.

1 Answers

First, user/email have nothing to do with remote Git hosting server authentication, and are only used for local commit authorship.

Second, make sure you are using HTTPS URL (which can indeed request for credentials -- username / password or username / token), not SSH (which could require entering a passphrase to decrypt the private SSH key)

cd /path/to/repository
git remote -v

Third, for HTTPS, try a HTTPS access token instead of your actual account password.

Related