Question

Just getting started with Git.

I have an existing personal account on Bitbucket, and I have created a team account as well using my work email address.

I created a repository, got it working, cloned it, etc. I then did a few test commits and pushes. I believe I entered my work email and password when did the initial push. I'm actually not 100% sure on this, as the initial connection was a bit of a struggle and I tried several different things.

I now see the commits and pushes on BitBucket, which is great, but it shows my personal account as the one who committed, and the team account as the one who pushed.

I have run git configure -l and it shows my personal email and name as user.name and user.email. It seems I am committing as one user and pushing as another, but I have no idea where to find this information.

If it matters, I am using git extensions to commit and push, but I did the initial setup with Git Bash. I am using the https URL.

How can I change the user credentials used for doing a Push?

Was it helpful?

Solution

Got it. The program used to store credentials was here:

http://gitcredentialstore.codeplex.com/

The page describes how to locate this information and change/delete it. Control Panel => User Accounts => Manage Your Credentials.

OTHER TIPS

I had the same problem, in my case, I was using the wrong repository url when pushing my code...

I created the clone on my computer using the url containing the Team account username (ex: https://TEAM_ACCOUNT_USERNAME@bitbucket.org/aaa/bbb.git) so this url was used when pushing as it is stored in the .git/config file.

The solution was to change that setting to use the url for the same repository but using the one coming from my personal Bitbucket account (ex: https://MY_PERSONAL_ACCOUNT_USERNAME@bitbucket.org/aaa/bbb.git)

Hope this help

Etienne

I like a tutorial. If talks about settings you should understand that git can 3 levels settings. It is systems settings, local settings for projects and global settings for all projects.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top