-1

I recently got a new Mac, and it comes with Git installed. I tried to pull from a repo, it asked me for my password, I entered the password for the Bitbucket account with which I have access to the repo, and it said Login failed due to incorrect login credentials or method

Is there something I need to set up locally in order to be able to pull from a Bitbucket repo? For example, do I need to "log in" to Git locally? This is also a new Bitbucket account, and I haven't set up an SSH key or anything. I think I did that a long time ago with my previous account.

gkeenley
  • 6,088
  • 8
  • 54
  • 129

1 Answers1

1

Assuming that you are trying to authenticate via SSH: the problem must be that there are no SSH keys registered that belong to your new Mac. So the repo at Bitbucket will not recognize you. Create a pair of new SSH keys on your Mac (private key and public key) and then register the -public- key at the Bitbucket website (Personal Settings > SSH Keys).

If you need more details, Bitbucket has a how-to for macOS to help you in creating a new pair of SSH keys to work with.


If you are cloning a repo via HTTPS (git clone https://username@bitbucket.org/...) and the repo is private, then you are going to need something that can handle the auth process for you.

Since you´ll be using your user account to authenticate it is likely you´ll have to deal with two-factor authentication or other interactive/multi-step process to get access. Maybe the issue here is that you are missing that part in your new Mac?

You can use GitCredentialManager to handle the auth process for you. In macOS you can install GitCredentialManager using brew.

Hope that helps!