打開終端、 直接輸入 git config --global credential.helper osxkeychain 回車、
git config --global credential.helper osxkeychain
出現彈窗讓輸入電腦密碼、 輸入電腦密碼、點擊始終允許、 完事。