mal
mal

Reputation: 3224

Changed git repository name on bitbucket and now authentication fails when I try pull/push

When I try to pull it hangs for a while, then the error I'm getting is: fatal: Authentication failed for 'https://...'
I've looked at a couple of answers, but they don't work for me.
I'm using ssh keys for login.
When I run git remote -v it returns the correct urls for push/pull, my git config looks good.
What am I missing?
I've seen things like this suggested a few times:
git config --global credential.helper store
But they don't work, I assume because I'm not using a user/password in that way.
Got any ideas?
EDIT: More info -
After changing the url to ssh I get the following:

The authenticity of host 'bitbucket.apps.mysite.com (10.101.10.10)' can't 
be established.
ECDSA key fingerprint is SHA256:2EAIgH1GS8Ocfepmi/hjhEu8paYcohl53kuVm9GgxRU.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'bitbucket.apps.mysite.com,10.101.10.10' (ECDSA) 
to the list of known hosts.
[email protected]: Permission denied (publickey,gssapi- 
keyex,gssapi-with-mic).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

So at least it's a step in the right direction.

Upvotes: 0

Views: 203

Answers (1)

mal
mal

Reputation: 3224

In my case the url suggested by the site was wrong. Our bitbucket is hosted on our own domain. The website suggested changing the clone url to:

https://bitbucket.apps.mysite.com/scm/op/my-service.git   

But I should have been using the ssh url like this:

ssh://[email protected]:7999/op/my-service.git

Upvotes: 1

Related Questions