Is there a way to cache GitHub credentials for pushing commits?

后端 未结 24 3256
囚心锁ツ
囚心锁ツ 2020-11-21 05:02

I recently switched to synchronizing my repositories to https:// on GitHub (due to firewall issues), and it asks for a password every time.

Is there a way to cache t

24条回答
  •  滥情空心
    2020-11-21 05:03

    It wasn't immediately obvious to me that I needed to download the helper first! I found the credential.helper download at Atlassian's Permanently authenticating with Git repositories.

    Quote:

    Follow these steps if you want to use Git with credential caching on OS X:

    Download the binary git-credential-osxkeychain.

    Run the command below to ensure the binary is executable:

    chmod a+x git-credential-osxkeychain
    

    Put it in the directory /usr/local/bin.

    Run the command below:

    git config --global credential.helper osxkeychain
    

提交回复
热议问题