Change credentials for Push in Git

Just start with git.

I have a personal Bitbucket account, and I also created a team account using my work email address.

I created a repository, got it working, cloned it, etc. Then I made some test commits and clicked. I believe that I entered my work address and password when I took the first step. Actually, I'm not really 100% sure, because the initial connection was crowded, and I tried several different things.

Now I see the commits and clicks on BitBucket, which is great, but it shows my personal account as the one who committed and the team account as the one who clicked.

I ran git configure -l and it shows my personal email address and name as user.name and user.email. I seem to be committing as one user and pushing another, but I have no idea where to find this information.

If that matters, I use git extensions to commit and click, but I did the initial setup using git Bash. I am using https url.

How can I change the user credentials used to execute push?

+4
source share
3 answers

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

http://gitcredentialstore.codeplex.com/

The page describes how to find this information and change / delete it. Control Panel => User Accounts => Manage your credentials.

+5
source

I had the same problem, in my case I used the wrong repository URL when clicking my code ...

I created a clone on my computer using a URL containing the username of the Team (for example: https: // TEAM_ACCOUNT_USERNAME@bitbucket.org /aaa/bbb.git ), so this URL was used when clicked because it is saved in the .git / config file.

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

Hope for this help

Etienne

0
source

I like the tutorial . Speaking of settings, you should understand that git can set 3 levels. These are system settings, local settings for projects and global settings for all projects.

-1
source

Source: https://habr.com/ru/post/1486514/


All Articles