Git push requires username and password

前端 未结 24 2489
灰色年华
灰色年华 2020-11-22 04:14

I cloned a Git repository from my GitHub account to my PC.

I want to work with both my PC and laptop, but with one GitHub account.

When I try to push to or p

24条回答
  •  轮回少年
    2020-11-22 04:40

    Source: Set Up Git

    The following command will save your password in memory for some time (for Git 1.7.10 or newer).

    $ git config --global credential.helper cache
    # Set git to use the credential memory cache
    
    $ git config --global credential.helper 'cache --timeout=3600'
    # Set the cache to timeout after one hour (setting is in seconds)
    

提交回复
热议问题