This is new set of git notes. First is here.
When you have issues like this:
You might have added a few values for one config setting.
git config --list will show it for you. Next you may hit
git config -e (and edit mode will be opened) or unset:
git config --get-all user.name #local repo git config file. git config --global --get-all user.name #user config file. git config --system --get-all user.name #system git config file.
FYI: Helper Resource.
Password helper for Windows
I used to use “git config credential.helper store”, but time ago I faced with issue in cloned repo via SSH access. And I was working on Windows. So there is “git-credential-winstore.exe”
Unzip the file and run the git-credential-winstore.exe program inside. This will start up the helper and update your git config to use it.
Tip: The credential helper only works when you clone an HTTPS repository URL. If you use the SSH repository URL instead, SSH keys are used for authentication.
Access to remote repo.
There was another need to fetch data via https, but with no credentials via plain text.
Some repositories on github, when I pushed, respond me like this:
fatal: could not read Username for 'https://github.com': No such file or directory
So I googled, and here is solution:
git remote set-url origin email@example.com:username/repo.git
Or if you like 2-steps 🙂
git remote rm origin git remote add origin 'firstname.lastname@example.org:username/repo.git'
But this did not help much.
The only one way to use password as plain text:
After that all repositories I have on Windows, use file
%USERPROFILE%\.git-credentials with plaintext hardcoded user and pass.
When I reinstalled my Git on Windows with no LF/CRLF change, my existed git repositories were with code change like 100%, but the same file content. Basically, it was change on binary level.
So when you start project, make sure:
- You are installing with setting “AS IS” on 3rd or 4th window/step.
- Double check by executing “
git config --list“, you should have
core.autocrlf = false