Still cannot resolve Git SSH credentials for 1st March deadline

Viewed 3139

Github is about to cut me off from my Digital Ocean server next week, it seems I am using the wrong email, I have tried all the suggestions on Stack Overflow and nothing seems to work.

So I have my BitBucket account as rxxxr@gmail.com, I can access BitBucket and generate an app password, no problem.

However when I push to Git, I still get the warning message "You are using an account password for Git over HTTPS etc"

The problem appears to be that I am pushing to Git with the wrong credentials.
My Bitbucket account is rxxxr@gmail.com, but I am pushing to git using tim@nxxxd.com and then pulling Git to my server using rxxxr@gmail.com.

When I started remote working for Nxxxd, I had to use tim@nxxxd.com to push to their Git account, and my MacBook Air still uses this for git even though it should be using rxxxr@gmail.com for Git.

Every attempt to get rid of tim@nxxxd.com in Git or on my Mac seems to be ignored by Git: I want to push to git using rxxxr@gmail.com and the new app password - any suggestions?

3 Answers

@VonC was almost right and helped with the new credentials, once I removed the old credentials it resolved. This required the lines:

git config --system --unset credential.helper

git config --global --unset credential.helper

If you are using HTTPS, the wrong credentials are probably cached in your credential storage.

Check the value, from the local repository folder, of

git config credential.helper
xxx

Then, using a BitBucket HTTPS access token from the right account rxxr, store the token for that server:

printf "host=bitbucket.org\nprotocol=https\nusername=rxxr\npassword=BitBucketToken" | \ 
git-credential-xxx store

Check it has stored the right value with:

printf "host=bitbucket.org\nprotocol=https\nusername=rxxr" | \ 
git-credential-xxx get

You next push will use the right credentials.

I solved my problem just by setting the git credentials for my repository :

git config user.name yourBitBucketUserName

git config user.password yourBitBucketAppPassword

Your Bitbucket username can be found under Account | Personal settings.

You can list git's settings with :

git config --list

Related