Reputation: 101
I'm new to Github and Git, tried to use gitbash on Windows.After adding and committing files ,If I add the git push cmd.. The cli asks for username... And then a password with no interface to enter password.. What do I do?
Upvotes: 2
Views: 357
Reputation: 799
From git bash you should prefer to run the command:
git config --global credential.helper wincred
At that point, running a command like git pull and entering your credentials one time should have it stored for future use. Git has a built-in credentials system that works in different OS environments.
You can get more details on the git website Git Tools - Credential Storage.
And you should use git pull
before git push
if it has been moved to remote server before.
Hope it works!
Upvotes: 1
Reputation: 1324347
Check the value of git config credential.helper
: if it is "manager", open the Windows Credential Manager and look if you already have a github.com entry.
If not and if the issue persists, try the same command from a regular CMD (not git bash) and the following simplified PATH:
set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%
(replace "path\to\git
" with your Git installation folder)
Upvotes: 1