I was pushing and pulling from git in Terminal then I changed my username on github.com. I went to push some changes and it couldn\'t push because it was still recognizing
Please update new user repository URL
git remote set-url origin https://username@bitbucket.org/repository.git
I tried using below commands, it's not working:
git config user.email "email@example.com"
git config user.name "user"
OR
git config --global user.email "email@example.com"
git config --global user.name "user"
git config --list
to check current username & email in your local repo.git config [--global] user.name "Full Name"
git config [--global] user.email "email@address.com"
.git/config
manually instead.When performing step 2 if you see credential.helper=manager
you need to open the credential manager of your computer (Win or Mac) and update the credentials there
Here is how it look on windows
Troubleshooting? Learn more
**Check by executing this**
git config --list
**Change user email**
git config --global user.email "email@example.com"
**Change user name**
git config --global user.name "user"
**Change user credential name**
git config --global credential.username "new_username"
**After this a window popup asking password.
Enter password and proceed.**
There is a easy solution for that problem, the solution is removed the certificate the yours Keychain, the previous thing will cause that it asks again to the user and password.
Steps:
Search the certificate gitHub.com.
Remove gitHub.com certificate.
Execute any operation with git in your terminal. this again ask your username and password.
For Windows Users find the key chain by following:
Control Panel >> User Account >> Credential Manager >> Windows Credential >> Generic Credential
I recommend you to do this by simply go to your .git folder, then open config file. In the file paste your user info:
[user]
name = Your-Name
email = Your-email
This should be it.
If you have cloned your repo using url that contains your username, then you should also change remote.origin.url
property because otherwise it keeps asking password for the old username.
example:
remote.origin.url=https://<old_uname>@<repo_url>
should change to
remote.origin.url=https://<new_uname>@<repo_url>