I recently upgraded git and apparently broke something. Now, whenever git tries to interact with my server (Bitbucket) I'm getting an error message and prompted for username and password. EVERY time.
Here's the error I'm getting:
git: 'credential-manager-core' is not a git command. See 'git --help'.
I have my git config set for user.name and user.email (this all worked before the upgrade), but I believe this error is blocking git from putting my credentials into the Credential Manager. I presume I have a bad config file somewhere but haven't been able to find it.
Turns out credential-manager-core.exe was missing from the git bin folder. I ended up uninstalling Git, manually clearing out the folders and then reinstalling.
Thanks everyone for the suggestions, got me looking in the right direction!
I have a Windows 7 computer at work that someone else used before I joined the company. They have git setup with winmerge. While it may be a good idea, I want to remove it and return to a basic "default" git installation.
I tried uninstalling git and gitextensions (which I found on the computer) and after the restart I reinstalled git. I still see the same winmerge options when I do git config --list.
Here is a screenshot of what it is telling me. How would I restore this computer to a default install without winmerge? Thanks in advance!
Screenshot from git config --list
Or here is the code (not that "$REMOTE" is from the previous line)
core.editor="C:/Program Files (x86)/GitExtensions/GitExtensions.exe" fileeditor
merge.tool=DiffMerge
diff.guitool=winmerge
credential.helper=!\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\"
difftool.winmerge.path=C:/Program Files (x86)/WinMerge/winmergeu.exe
difftool.winmerge.cmd="C:/Program Files (x86)/WinMerge/winmergeu.exe" -e -u "$LOCAL" "$REMOTE"
mergetool.DiffMerge.path=C:/Program Files (x86)/WinMerge/winmergeu.exe`
Like #AndrewC said in the comments, you can delete the .gitconfig file found in your user profile (C:\Users\User\.gitconfig).
Alternatively, you can do git config --global --edit and manually delete the lines from the file opened.
I'm a Git instructor, so must have multiple GitHub accounts for demonstration purposes. I'm using Git on both Ubuntu, Windows and sometimes in OS X.
I have a problem in OS X where Git remembers the previous credentials. According to the screen shot, I want to push a testing repository to GitHub account of jeud, but Git remembers the credentials of account tutor4dev, so Git never prompts me for any authentication like I would get when using Ubuntu and Windows.
I have tried git config credential.https://github.com.jeud jeud, but it's still not working.
Please guide what to do, thanks.
Edited
In my case, I can reset the current username and password using /Applications/Utilities/Keychain Access
But if possible, I would like Git to prompt me for authentication every time when github.com requires for credential.
I have removed the credential helper using git config --global --unset credential.helper and setup core.askpass using git config --global core.askpass true, but Git still uses the username and password stored in the OS.
I have solved my problem by deleting existing credential on my machine using /Applications/Utilities/Keychain Access
Try using:
git config --global --edit
That should show you the contents of .gitconfig located at:
~/.gitconfig
I recently reinstalled Windows and I have a problem with downloading files from repository.
I have installed GIT and Python, but when I am trying to download anything from Bitbucket I get the message:
"fatal: could not read Password for: 'https://username#bitbucket.org': No such file or directory".
What am I doing wrong?
I solved it setting a global parameter:
git config --global core.askpass /usr/libexec/git-core/git-gui--askpass
Try to include your username and password in the URL like this:
git clone https://username:password#bitbucket.org/path_to/myRepo.git
I had the same problem an hour or so ago. My issue was that I was trying to do a git clone but using the https url instead of the ssh one. If you go to your repository you can select ssh or https from the dropdown for the clone url. Hope that helps!
Just solved this Problem
Git in Version 1.8.5.2 contains a but using bitbucket, updating my Git to Version 1.9.0 solved this problem.
I just tried to do the same thing and it did not work for me, and I too recently reinstalled windows on my machine.
I am used to checking out a private repo from my bitbucket account by using the simple command
git clone https://username#bitbucket.org/username/repo.git
and then being prompted to enter a password for my user.
It looks like this might be broken in version 1.8.5.2. I downgraded to version 1.8.4 and it started working as expected.
Git download list: http://code.google.com/p/msysgit/downloads/list
Hope this helps!
For https connections try installing the "Git Credential Store" (an "optional" step in the BitBucket tutorial).
This is how to install it:
Download git-credential-winstore.exe from http://gitcredentialstore.codeplex.com/
Open the Git Bash Shell and change the current directory to where git-credential-winstore.exe is located
Run ./git-credential-winstore -i /bin/git
Try to use git fetch in order to reenter and update the outdated password.
I had the similar issue. The cached password become invalid due to updating the actual password to new one. But git didn't ask me for reentering the valid password and just gave me an error that Authentication failed while I was trying to pull changes.
But magically, git asked me for the actual password when I typed git fetch instead of pulling the data. Once I entered the new password, apparently git updated the old one in its credentials storage and no longer asked me about the entering password again.
FIX IT (09/2020)
All the the answers here are wrong... You shouldn't NEVER do something like that:
https://username:PASSWORD#Bitbucket.org
SOLUTION
All you have to do is:
Go to Sourcetree -> Preferences -> Git
You will have the section "Git Version" with 2 options: Reset to ebedded Git and Use System Git
Sourcetree use the Ebedded git for default.
Click on "Use System Git" and.... Fixed!
Follow me on:
GIthub
Twitter
In my case, the problem was with the global file .gitconfig on Windows.
When I tried to use solution provided by #jsarroyo in Git BASH, I got an error saying that the file .gitconfig.lock did not exist. I could find no way to fix it.
When I completely removed .gitconfig, everything worked fine.
WARNING: This way, you lose all your git settings and you need to configure it again.
In your project go to .git/config and add after username :password
before : https://username#bitbucket.org/repo.git
afetr : https://username:password#bitbucket.org/repo.git
I had the same problem with the Android Studio Chipmunk 2021.2.1 Patch 2 integrated version control. Additionally I have BitBucket and GitHub ssh keys setup on my Windows PC. I was able to fix the issue by setting checked Use credential helper in File | Settings | Version Control | Git
In my case, it was just a wrong password for bitbucket entered into the prompt dialog. When I entered the correct password, the error disappeared.
If you are using android studio you might want to try enabling "Use credential helper".
Steps:
Go to File -> Settings -> Version control -> Git
Find "Use credential helper" option (mostly at bottom)
Enable this option by marking the checkbox before the option
I got this issue when I upgraded from Windows 7 to 8 and settings messed up for me too. I had to regenerate private and public keys, and change my TortoiseGIT to use plink, instead of SSH.exe
I wrote step by step instructions at http://techblog.saurabhkumar.com/2015/09/using-tortoisegit-on-windows-with.html
For Bitbucket If you are ok for the repo to be public you can just uncheck the "This is a private repository" checkbox in repo settings. Now a simple git clone should work.
I am using Cygwin and Git. Every time I push/pull to a repo on Bitbucket with a https url I am asked to enter a password.
Is there a way to store these credentials (like with ssh-keys)?
I tried to install Windows Credential Store for Git but I can't get it to work with cygwin's Git.
Thanks!
Update:
I found my answer here: Is there a way to skip password typing when using https:// on GitHub?
Summarized:
Remember passwords for 15 minutes (default):
git config --global credential.helper cache
Remember passwords for 10 hours:
git config --global credential.helper 'cache --timeout=36000'
Store passwords (didn't try this):
git config --global credential.helper store
Reset:
git config --unset --global credential.helper
Cim
The way OP answered his own question is one way to go about it.
The Windows Credential Store project was discontinued in 2015. Its original author suggests to use Git Credential Manager for Windows, maintained by Microsoft. Their installer is focused on Git for Windows, however the program itself works well with Cygwin, you just have to install it manually.
Go the GCMW's latest release, download the zip file (not the installer), extract its contents (only .dll and .exe files are needed) to C:\cygwin\usr\libexec\git-core\ for 32-bit Cygwin, or C:\cygwin64\usr\libexec\git-core\ for 64-bit Cygwin. Reference
To get git to use GCMW, execute: git config --global credential.helper manager
To get GUI prompts for credentials, execute: git config --global credential.modalprompt true
If you want this to be a per-repository setting, remove the --global option.
I made Windows Credential Store working with cygwin. The only thing that needs to be changed is global ~/.gitconfig file.
Change 'helper' value which can be found usually at the end of the file to the following:
[credential]
helper = !'/cygdrive/C/Users/<YOUR-ACCOUNT-NAME>/AppData/Roaming/GitCredStore/git-credential-winstore.exe'
For an explanation, cygwin simply uses different paths and the value must follow the rules of course.