4

Thanks for looking into this, I use a windows10 machine, This is an issue I've been facing now for over past few months, as it happens visual studio code keeps prompting me repeatedly for username and password for every git push, I've tried caching the credentials by using git config --global credential.helper wincred As per this page and also This stackoverflow post did not help I tried git config --global credential.helper cache and this {"git.autofetch": false} none of these worked, can you please help me ?

Vscode info

Version: 1.52.0 (system setup)
Commit: 940b5f4bb5fa47866a54529ed759d95d09ee80be
Date: 2020-12-10T22:45:11.850Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.18363
Pawan Nirpal
  • 565
  • 1
  • 12
  • 29

2 Answers2

3

Looks like your credentials are not being stored anywhere. Run this command on powershell

git config --global credential.helper wincred

Which would allow git to store credentials on Windows Credential Manager. Then do a git fetch or pull and once again enter your credentials as prompted. This time your credentials should be stored and you won't be promoted.

You can verify that by going to Credentials Manager (by searching on Start menu), then select Windows Credentials and under Generic Credentials you will find your git host either created or updated "today".

If it won't work, delete the git folder and clone again.

Elnoor
  • 3,401
  • 4
  • 24
  • 39
0

When this happened to me, I added my credentials to Windows Credential Manager with the git repo as the host address. You should be able to search as “Windows Credential Manager” from the start menu

2189490
  • 118
  • 7
  • How exactly, I'm not an advanced git user so precise steps would be great. do you mean ```https://github.com/repo-addr.git``` something like this – Pawan Nirpal Dec 16 '20 at 14:18