git prompting for username and password - windows

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!

Related

VS Code not tracking file changes and says install git

extension: GitHub Pull Requests and Issues
Don't know why its behaving like this, git is installed... still its saying install git
showing:
Activating the Pull Requests and Issues extension failed. Please make sure you have git installed.
Go to setting and search git path
edit the setting.json in there, the last parameter git.path
find the git path with this command in terminal
which git
then reload the VS Code

Clear git-credential-manager-core cached login

Cannot clear the git-credential-manager-core cache
it always show the last user
Using Windows credentials Manager - no login regarding Git
Using the "Forget: option in Dialog not working
Using "Erase" in Git Bash Not clearing
Delete all Sign-In from Visual Studio
delete all "%LOCALAPPDATA%.IdentityService"
any help would be most appreciated
You should try at command line by git config --global --unset user.password.
Please let me know if it worked.
Regards.
Disable Git Credential Manager if you don’t use it.
git config --global --unset credential.helper
Do all above Steps - in original Question.
And also clean all content using Internet Explorer

Cygwin failing to open .git/config

I believe that I am missing something obvious.
I am using Windows 8.1 in VMWare Fusion on a Mac OS X host. I have installed Git as a Windows component, and I also installed Git as a Cygwin component.
I was able to use all my usual Git commands on Cygwin within a versioned directory. However, when I tried to push, I was notified that I have not yet associated my e-mail or name (git config --global user.name <name>; git config --global user.email <email address>).
When I ran those commands, I got a permission denied. Afterward, I was unable to issue ANY git command (status; show; pull; fetch; etc...).
I received the following error in Cygwin:
fatal: permission denied opening .git/config
UPDATE: I seemed to have resolved this by deleting my Cygwin C:\cygwin64\home\<user>\.gitconfig file. Any idea what may have been going on?
I believe that there is an issue when a .gitconfig is in the Cygwin home directory and there's a config file in the actual C:\Users\<user>\.git\ folder.
Am I missing something?
I seemed to have resolved this by deleting my Cygwin C:\cygwin64\home\.gitconfig file.

How to make git reset previous credentials on OS X?

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

Bitbucket, Windows and "fatal: could not read Password for"

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.

Resources