Avoid Inputing Password While Pushing/Pulling Git Project

时间:2023-03-09 07:45:58
Avoid Inputing Password While Pushing/Pulling Git Project

If we add public key in our git account, we can pull/push project easily without password.

However, we need passwd every time when we pull/push project from https format url.

It is too frequently  to do such things and it is annoying. So, to avoid entering password

from time to time, we can set credential in our local git project, that would make things go

easily. Here is the solution:

  cd project
 git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=3600'

Good news, we do not have to offer password in 1 hours now.