Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I update the password for Git?

I'm using BitBucket with Xcode and Git for version control, and recently I changed all of my passwords (thanks Adobe!).

Unsurprisingly, I'm no longer able to push my local commits to my repository on BitBucket (Authentication failed for 'https://______.git'), but I'm forgetting how to update the cached password on my iMac. Somehow I've been unable to find it on Google or Stack Overflow, though it seems to me it should be rather straightforward...

like image 844
Ken M. Haggerty Avatar asked Nov 25 '13 14:11

Ken M. Haggerty


People also ask

How do I change my password in git?

git push) and enter your username. For the password you need to generate a Personal Access Token. Go to https://github.com/settings/profile select the Developer Settings on the right. Select Personal Access Token Generate new token .

How do I add a password to a Git repository?

To connect to a Git repository with authentication over HTTP(S), every time it needs to set a username and password. You can configure Git to remember a username and password by storing them in a remote URL or by using Git credential helper.

How do I find my git password?

if $ git config credential. helper returns manager , the password is stored in the windows credential manager, if it returns store , password is stored in a . git-credentials file in the user folder.


1 Answers

To fix this on macOS, you can use

git config --global credential.helper osxkeychain 

A username and password prompt will appear with your next Git action (pull, clone, push, etc.).

For Windows, it's the same command with a different argument:

git config --global credential.helper wincred 
like image 187
Ken M. Haggerty Avatar answered Sep 28 '22 23:09

Ken M. Haggerty