how to fix git always asking username and password.

   1. using SSH instead of https

      git remote set-url origin git@github.com:username/repo.git

2.storing the username and password 
     git config --global
credential.helper store
or save them for just one session
     git config --global credential.helper cache
  or set a timer for them
git config -- global credential.helper 'cache --timeout=600'

posted @ 2021-07-10 17:15  zjhangia  阅读(34)  评论(0编辑  收藏  举报